Trait icu_provider::DataProvider

source ·
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§

source

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
where M: DataMarker, P: DataProvider<M> + ?Sized,

source§

impl<M, P> DataProvider<M> for Box<P>
where M: DataMarker, P: DataProvider<M> + ?Sized,

source§

impl<M, P> DataProvider<M> for Rc<P>
where M: DataMarker, P: DataProvider<M> + ?Sized,

source§

impl<M, P> DataProvider<M> for Arc<P>
where M: DataMarker, P: DataProvider<M> + ?Sized,

Implementors§

source§

impl DataProvider<HelloWorldV1Marker> for HelloWorldProvider

source§

impl<M, P> DataProvider<M> for DowncastingAnyProvider<'_, P>
where P: AnyProvider + ?Sized, M: DataMarker, for<'a> YokeTraitHack<<M::DataStruct as Yokeable<'a>>::Output>: Clone, M::DataStruct: ZeroFrom<'static, M::DataStruct> + MaybeSendSync,

source§

impl<P, M> DataProvider<M> for DeserializingBufferProvider<'_, P>
where M: DataMarker, P: DynamicDataProvider<BufferMarker> + ?Sized, for<'de> YokeTraitHack<<M::DataStruct as Yokeable<'de>>::Output>: Deserialize<'de>,