pub trait DataProvider<M>where
M: DataMarker,{
// Required method
fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>;
}Expand description
A data provider that loads data for a specific DataMarkerInfo.
Required Methods§
Sourcefn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
Query the provider for data, returning the result.
Returns Ok if the request successfully loaded data. If data failed to load, returns an
Error with more information.
Implementations on Foreign Types§
Source§impl<M, P> DataProvider<M> for &P
impl<M, P> DataProvider<M> for &P
fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
Source§impl<M, P> DataProvider<M> for Box<P>
Available on crate feature alloc only.
impl<M, P> DataProvider<M> for Box<P>
Available on crate feature
alloc only.fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
Source§impl<M, P> DataProvider<M> for Rc<P>
Available on crate feature alloc only.
impl<M, P> DataProvider<M> for Rc<P>
Available on crate feature
alloc only.fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
Source§impl<M, P> DataProvider<M> for Arc<P>
Available on target_has_atomic=ptr and crate feature alloc only.
impl<M, P> DataProvider<M> for Arc<P>
Available on
target_has_atomic=ptr and crate feature alloc only.