Struct icu_provider::any::AnyResponse
source · pub struct AnyResponse {
pub metadata: DataResponseMetadata,
pub payload: AnyPayload,
}
Expand description
A DataResponse
for type-erased values.
Convertible to and from DataResponse<AnyMarker>
.
Fields§
§metadata: DataResponseMetadata
Metadata about the returned object.
payload: AnyPayload
The object itself
Implementations§
source§impl AnyResponse
impl AnyResponse
sourcepub fn downcast<M>(self) -> Result<DataResponse<M>, DataError>where
M: DynamicDataMarker,
for<'a> YokeTraitHack<<M::DataStruct as Yokeable<'a>>::Output>: Clone,
M::DataStruct: ZeroFrom<'static, M::DataStruct> + MaybeSendSync,
pub fn downcast<M>(self) -> Result<DataResponse<M>, DataError>where
M: DynamicDataMarker,
for<'a> YokeTraitHack<<M::DataStruct as Yokeable<'a>>::Output>: Clone,
M::DataStruct: ZeroFrom<'static, M::DataStruct> + MaybeSendSync,
Transforms a type-erased AnyResponse
into a concrete DataResponse<M>
.
sourcepub fn downcast_cloned<M>(&self) -> Result<DataResponse<M>, DataError>where
M: DynamicDataMarker,
M::DataStruct: ZeroFrom<'static, M::DataStruct> + MaybeSendSync,
for<'a> YokeTraitHack<<M::DataStruct as Yokeable<'a>>::Output>: Clone,
pub fn downcast_cloned<M>(&self) -> Result<DataResponse<M>, DataError>where
M: DynamicDataMarker,
M::DataStruct: ZeroFrom<'static, M::DataStruct> + MaybeSendSync,
for<'a> YokeTraitHack<<M::DataStruct as Yokeable<'a>>::Output>: Clone,
Clones and then transforms a type-erased AnyResponse
into a concrete DataResponse<M>
.
Trait Implementations§
source§impl Debug for AnyResponse
impl Debug for AnyResponse
source§impl From<AnyResponse> for DataResponse<AnyMarker>
impl From<AnyResponse> for DataResponse<AnyMarker>
source§fn from(other: AnyResponse) -> Self
fn from(other: AnyResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AnyResponse
impl !RefUnwindSafe for AnyResponse
impl !Send for AnyResponse
impl !Sync for AnyResponse
impl Unpin for AnyResponse
impl !UnwindSafe for AnyResponse
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
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