pub trait DynamicDataProvider<M>where
M: DynamicDataMarker,{
// Required method
fn load_data(
&self,
marker: DataMarkerInfo,
req: DataRequest<'_>,
) -> Result<DataResponse<M>, DataError>;
}Expand description
A data provider that loads data for a specific data type.
Unlike DataProvider, there may be multiple markers corresponding to the same data type.
Required Methods§
Sourcefn load_data(
&self,
marker: DataMarkerInfo,
req: DataRequest<'_>,
) -> Result<DataResponse<M>, DataError>
fn load_data( &self, marker: DataMarkerInfo, 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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".