icu_provider

Trait DataProvider

Source
pub trait DataProvider<M>
where M: KeyedDataMarker,
{ // Required method fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>; }
Expand description

A data provider that loads data for a specific DataKey.

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<'a, M, P> DataProvider<M> for &'a P
where M: KeyedDataMarker, P: DataProvider<M> + ?Sized,

Source§

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

Source§

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

Source§

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

Implementors§