pub struct DataProviderWithKey<M, P> { /* private fields */ }
Expand description
A DataProvider
associated with a specific key.
Implements BoundDataProvider
.
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