pub struct LayeredThriftAdapter<Fst, Snd>where
Fst: ThriftAdapter,
Snd: ThriftAdapter,
Fst::StandardType: Into<Snd::AdaptedType>,
Snd::AdaptedType: Into<Fst::StandardType>,{ /* private fields */ }Trait Implementations§
Source§impl<Fst, Snd> ThriftAdapter for LayeredThriftAdapter<Fst, Snd>where
Fst: ThriftAdapter,
Snd: ThriftAdapter,
Fst::StandardType: Into<Snd::AdaptedType>,
Snd::AdaptedType: Into<Fst::StandardType>,
impl<Fst, Snd> ThriftAdapter for LayeredThriftAdapter<Fst, Snd>where
Fst: ThriftAdapter,
Snd: ThriftAdapter,
Fst::StandardType: Into<Snd::AdaptedType>,
Snd::AdaptedType: Into<Fst::StandardType>,
Source§type StandardType = <Snd as ThriftAdapter>::StandardType
type StandardType = <Snd as ThriftAdapter>::StandardType
Aka the “from” type.
Source§type AdaptedType = <Fst as ThriftAdapter>::AdaptedType
type AdaptedType = <Fst as ThriftAdapter>::AdaptedType
Aka the “to” type.
Source§fn from_thrift(
value: Self::StandardType,
) -> Result<Self::AdaptedType, Self::Error>
fn from_thrift( value: Self::StandardType, ) -> Result<Self::AdaptedType, Self::Error>
Source§fn to_thrift(value: &Self::AdaptedType) -> Self::StandardType
fn to_thrift(value: &Self::AdaptedType) -> Self::StandardType
Source§fn from_thrift_field<T: ThriftAnnotations>(
value: Self::StandardType,
field_id: i16,
) -> Result<Self::AdaptedType, Self::Error>
fn from_thrift_field<T: ThriftAnnotations>( value: Self::StandardType, field_id: i16, ) -> Result<Self::AdaptedType, Self::Error>
Method called when this adapter is used on a Thrift struct’s field. Provides information
about the specific field ID in
field_id. The type of the struct that owns this field is
passed in as T. Read moreSource§fn to_thrift_field<T: ThriftAnnotations>(
value: &Self::AdaptedType,
field_id: i16,
) -> Self::StandardType
fn to_thrift_field<T: ThriftAnnotations>( value: &Self::AdaptedType, field_id: i16, ) -> Self::StandardType
Method called when this adapter is used on a Thrift struct’s field. Provides information
about the specific field ID in
field_id. The type of the struct that owns this field is
passed in as T. Read moreSource§fn from_thrift_default<T: ThriftAnnotations>(
value: Self::StandardType,
field_id: i16,
) -> Self::AdaptedType
fn from_thrift_default<T: ThriftAnnotations>( value: Self::StandardType, field_id: i16, ) -> Self::AdaptedType
Method called when the adapted type is not present in a field during deserialization or is
populated with
..Default::default(). The value passed here is the default original type
value for the field. This can be used to record that the field was not present inside
of your adapted type. Read moreAuto Trait Implementations§
impl<Fst, Snd> Freeze for LayeredThriftAdapter<Fst, Snd>
impl<Fst, Snd> RefUnwindSafe for LayeredThriftAdapter<Fst, Snd>where
<Snd as ThriftAdapter>::AdaptedType: Sized,
<Fst as ThriftAdapter>::StandardType: Sized,
Fst: RefUnwindSafe,
Snd: RefUnwindSafe,
impl<Fst, Snd> Send for LayeredThriftAdapter<Fst, Snd>where
<Snd as ThriftAdapter>::AdaptedType: Sized,
<Fst as ThriftAdapter>::StandardType: Sized,
Fst: Send,
Snd: Send,
impl<Fst, Snd> Sync for LayeredThriftAdapter<Fst, Snd>where
<Snd as ThriftAdapter>::AdaptedType: Sized,
<Fst as ThriftAdapter>::StandardType: Sized,
Fst: Sync,
Snd: Sync,
impl<Fst, Snd> Unpin for LayeredThriftAdapter<Fst, Snd>where
<Snd as ThriftAdapter>::AdaptedType: Sized,
<Fst as ThriftAdapter>::StandardType: Sized,
Fst: Unpin,
Snd: Unpin,
impl<Fst, Snd> UnwindSafe for LayeredThriftAdapter<Fst, Snd>where
<Snd as ThriftAdapter>::AdaptedType: Sized,
<Fst as ThriftAdapter>::StandardType: Sized,
Fst: UnwindSafe,
Snd: 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