Struct icu_provider::buf::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: DataMarker,
P: DynamicDataProvider<BufferMarker> + ?Sized,
for<'de> YokeTraitHack<<M::DataStruct as Yokeable<'de>>::Output>: Deserialize<'de>,
impl<P, M> DataProvider<M> for DeserializingBufferProvider<'_, P>where
M: DataMarker,
P: DynamicDataProvider<BufferMarker> + ?Sized,
for<'de> YokeTraitHack<<M::DataStruct 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> DryDataProvider<M> for DeserializingBufferProvider<'_, P>where
M: DataMarker,
P: DynamicDryDataProvider<BufferMarker> + ?Sized,
for<'de> YokeTraitHack<<M::DataStruct as Yokeable<'de>>::Output>: Deserialize<'de>,
impl<P, M> DryDataProvider<M> for DeserializingBufferProvider<'_, P>where
M: DataMarker,
P: DynamicDryDataProvider<BufferMarker> + ?Sized,
for<'de> YokeTraitHack<<M::DataStruct as Yokeable<'de>>::Output>: Deserialize<'de>,
source§fn dry_load(
&self,
req: DataRequest<'_>,
) -> Result<DataResponseMetadata, DataError>
fn dry_load( &self, req: DataRequest<'_>, ) -> Result<DataResponseMetadata, DataError>
source§impl<P, M> DynamicDataProvider<M> for DeserializingBufferProvider<'_, P>where
M: DynamicDataMarker,
P: DynamicDataProvider<BufferMarker> + ?Sized,
for<'de> YokeTraitHack<<M::DataStruct as Yokeable<'de>>::Output>: Deserialize<'de>,
impl<P, M> DynamicDataProvider<M> for DeserializingBufferProvider<'_, P>where
M: DynamicDataMarker,
P: DynamicDataProvider<BufferMarker> + ?Sized,
for<'de> YokeTraitHack<<M::DataStruct as Yokeable<'de>>::Output>: Deserialize<'de>,
source§fn load_data(
&self,
marker: DataMarkerInfo,
req: DataRequest<'_>,
) -> Result<DataResponse<M>, DataError>
fn load_data( &self, marker: DataMarkerInfo, 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> DynamicDryDataProvider<M> for DeserializingBufferProvider<'_, P>where
M: DynamicDataMarker,
P: DynamicDryDataProvider<BufferMarker> + ?Sized,
for<'de> YokeTraitHack<<M::DataStruct as Yokeable<'de>>::Output>: Deserialize<'de>,
impl<P, M> DynamicDryDataProvider<M> for DeserializingBufferProvider<'_, P>where
M: DynamicDataMarker,
P: DynamicDryDataProvider<BufferMarker> + ?Sized,
for<'de> YokeTraitHack<<M::DataStruct as Yokeable<'de>>::Output>: Deserialize<'de>,
source§fn dry_load_data(
&self,
marker: DataMarkerInfo,
req: DataRequest<'_>,
) -> Result<DataResponseMetadata, DataError>
fn dry_load_data( &self, marker: DataMarkerInfo, req: DataRequest<'_>, ) -> Result<DataResponseMetadata, DataError>
Auto Trait Implementations§
impl<'a, P> Freeze for DeserializingBufferProvider<'a, P>where
P: ?Sized,
impl<'a, P> RefUnwindSafe for DeserializingBufferProvider<'a, P>where
P: RefUnwindSafe + ?Sized,
impl<'a, P> Send for DeserializingBufferProvider<'a, P>
impl<'a, P> Sync for DeserializingBufferProvider<'a, P>
impl<'a, P> Unpin for DeserializingBufferProvider<'a, P>where
P: ?Sized,
impl<'a, P> UnwindSafe for DeserializingBufferProvider<'a, P>where
P: RefUnwindSafe + ?Sized,
Blanket Implementations§
source§impl<P> AsDeserializingBufferProvider for Pwhere
P: BufferProvider + ?Sized,
impl<P> AsDeserializingBufferProvider for Pwhere
P: BufferProvider + ?Sized,
source§fn as_deserializing(&self) -> DeserializingBufferProvider<'_, P>
fn as_deserializing(&self) -> DeserializingBufferProvider<'_, P>
Wrap this BufferProvider
in a DeserializingBufferProvider
.
This requires enabling the deserialization Cargo feature for the expected format(s):
deserialize_json
deserialize_postcard_1
deserialize_bincode_1
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more