Struct icu_provider::serde::DeserializingBufferProvider
source · pub struct DeserializingBufferProvider<'a, P: ?Sized>(/* private fields */);
Expand description
A BufferProvider
that deserializes its data using Serde.
Trait Implementations§
source§impl<P, M> DataProvider<M> for DeserializingBufferProvider<'_, P>where
M: KeyedDataMarker,
P: BufferProvider + ?Sized,
for<'de> YokeTraitHack<<M::Yokeable as Yokeable<'de>>::Output>: Deserialize<'de>,
impl<P, M> DataProvider<M> for DeserializingBufferProvider<'_, P>where M: KeyedDataMarker, P: BufferProvider + ?Sized, for<'de> YokeTraitHack<<M::Yokeable as Yokeable<'de>>::Output>: Deserialize<'de>,
source§fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
Converts a buffer into a concrete type by deserializing from a supported buffer format.
This requires enabling the deserialization Cargo feature for the expected format(s):
deserialize_json
deserialize_postcard_1
deserialize_bincode_1
source§impl<P, M> DynamicDataProvider<M> for DeserializingBufferProvider<'_, P>where
M: DataMarker,
P: BufferProvider + ?Sized,
for<'de> YokeTraitHack<<M::Yokeable as Yokeable<'de>>::Output>: Deserialize<'de>,
impl<P, M> DynamicDataProvider<M> for DeserializingBufferProvider<'_, P>where M: DataMarker, P: BufferProvider + ?Sized, for<'de> YokeTraitHack<<M::Yokeable as Yokeable<'de>>::Output>: Deserialize<'de>,
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>
Converts a buffer into a concrete type by deserializing from a supported buffer format.
This requires enabling the deserialization Cargo feature for the expected format(s):
deserialize_json
deserialize_postcard_1
deserialize_bincode_1
Auto Trait Implementations§
impl<'a, P: ?Sized> RefUnwindSafe for DeserializingBufferProvider<'a, P>where P: RefUnwindSafe,
impl<'a, P: ?Sized> Send for DeserializingBufferProvider<'a, P>where P: Sync,
impl<'a, P: ?Sized> Sync for DeserializingBufferProvider<'a, P>where P: Sync,
impl<'a, P: ?Sized> Unpin for DeserializingBufferProvider<'a, P>
impl<'a, P: ?Sized> UnwindSafe for DeserializingBufferProvider<'a, P>where P: RefUnwindSafe,
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