Struct icu_provider::any::DowncastingAnyProvider
source · pub struct DowncastingAnyProvider<'a, P: ?Sized>(pub &'a P);
Expand description
A wrapper over AnyProvider
that implements DynamicDataProvider<M>
via downcasting
Tuple Fields§
§0: &'a P
Trait Implementations§
source§impl<M, P> DataProvider<M> for DowncastingAnyProvider<'_, P>where
P: AnyProvider + ?Sized,
M: KeyedDataMarker,
for<'a> YokeTraitHack<<M::Yokeable as Yokeable<'a>>::Output>: Clone,
M::Yokeable: ZeroFrom<'static, M::Yokeable> + MaybeSendSync,
impl<M, P> DataProvider<M> for DowncastingAnyProvider<'_, P>where
P: AnyProvider + ?Sized,
M: KeyedDataMarker,
for<'a> YokeTraitHack<<M::Yokeable as Yokeable<'a>>::Output>: Clone,
M::Yokeable: ZeroFrom<'static, M::Yokeable> + MaybeSendSync,
source§fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
Query the provider for data, returning the result. Read more
source§impl<M, P> DynamicDataProvider<M> for DowncastingAnyProvider<'_, P>where
P: AnyProvider + ?Sized,
M: DataMarker,
for<'a> YokeTraitHack<<M::Yokeable as Yokeable<'a>>::Output>: Clone,
M::Yokeable: ZeroFrom<'static, M::Yokeable> + MaybeSendSync,
impl<M, P> DynamicDataProvider<M> for DowncastingAnyProvider<'_, P>where
P: AnyProvider + ?Sized,
M: DataMarker,
for<'a> YokeTraitHack<<M::Yokeable as Yokeable<'a>>::Output>: Clone,
M::Yokeable: ZeroFrom<'static, M::Yokeable> + MaybeSendSync,
source§fn load_data(
&self,
key: DataKey,
req: DataRequest<'_>,
) -> Result<DataResponse<M>, DataError>
fn load_data( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<DataResponse<M>, DataError>
Query the provider for data, returning the result. Read more
Auto Trait Implementations§
impl<'a, P> Freeze for DowncastingAnyProvider<'a, P>where
P: ?Sized,
impl<'a, P> RefUnwindSafe for DowncastingAnyProvider<'a, P>where
P: RefUnwindSafe + ?Sized,
impl<'a, P> Send for DowncastingAnyProvider<'a, P>
impl<'a, P> Sync for DowncastingAnyProvider<'a, P>
impl<'a, P> Unpin for DowncastingAnyProvider<'a, P>where
P: ?Sized,
impl<'a, P> UnwindSafe for DowncastingAnyProvider<'a, P>where
P: RefUnwindSafe + ?Sized,
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