Struct icu_provider::data_provider::DataProviderWithKey
source · pub struct DataProviderWithKey<M, P> {
inner: P,
_marker: PhantomData<M>,
}
Expand description
A DataProvider
associated with a specific key.
Implements BoundDataProvider
.
Fields§
§inner: P
§_marker: PhantomData<M>
Implementations§
source§impl<M, P> DataProviderWithKey<M, P>where
M: KeyedDataMarker,
P: DataProvider<M>,
impl<M, P> DataProviderWithKey<M, P>where
M: KeyedDataMarker,
P: DataProvider<M>,
sourcepub const fn new(inner: P) -> Self
pub const fn new(inner: P) -> Self
Creates a DataProviderWithKey
from a DataProvider
with a KeyedDataMarker
.
Trait Implementations§
source§impl<M, M0, Y, P> BoundDataProvider<M0> for DataProviderWithKey<M, P>where
M: KeyedDataMarker<Yokeable = Y>,
M0: DataMarker<Yokeable = Y>,
Y: for<'a> Yokeable<'a>,
P: DataProvider<M>,
impl<M, M0, Y, P> BoundDataProvider<M0> for DataProviderWithKey<M, P>where
M: KeyedDataMarker<Yokeable = Y>,
M0: DataMarker<Yokeable = Y>,
Y: for<'a> Yokeable<'a>,
P: DataProvider<M>,
source§fn load_bound(
&self,
req: DataRequest<'_>,
) -> Result<DataResponse<M0>, DataError>
fn load_bound( &self, req: DataRequest<'_>, ) -> Result<DataResponse<M0>, DataError>
Query the provider for data, returning the result. Read more
Auto Trait Implementations§
impl<M, P> Freeze for DataProviderWithKey<M, P>where
P: Freeze,
impl<M, P> RefUnwindSafe for DataProviderWithKey<M, P>where
P: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, P> Send for DataProviderWithKey<M, P>
impl<M, P> Sync for DataProviderWithKey<M, P>
impl<M, P> Unpin for DataProviderWithKey<M, P>
impl<M, P> UnwindSafe for DataProviderWithKey<M, P>where
P: UnwindSafe,
M: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more