Trait icu_provider::DynamicDataProvider

source ·
pub trait DynamicDataProvider<M>
where M: DataMarker,
{ // Required method fn load_data( &self, key: DataKey, 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 keys corresponding to the same data type. This is often the case when returning dyn trait objects such as AnyMarker.

Required Methods§

source

fn load_data( &self, key: DataKey, 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> DynamicDataProvider<M> for &'a P

source§

fn load_data( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<DataResponse<M>, DataError>

source§

impl<M, P> DynamicDataProvider<M> for Box<P>

source§

fn load_data( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<DataResponse<M>, DataError>

source§

impl<M, P> DynamicDataProvider<M> for Rc<P>

source§

fn load_data( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<DataResponse<M>, DataError>

source§

impl<M, P> DynamicDataProvider<M> for Arc<P>

source§

fn load_data( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<DataResponse<M>, DataError>

Implementors§