pub struct SetMapAdapter<A>{ /* private fields */ }Expand description
Transforms the given adapter A into an adapter with the signature BTreeSet<StandardType>
-> BTreeSet<AdaptedType>. Because Rust doesn’t have HKT, we cannot make this “generic” over
multiple collection types.
Trait Implementations§
Source§impl<A> ThriftAdapter for SetMapAdapter<A>
impl<A> ThriftAdapter for SetMapAdapter<A>
Source§type StandardType = BTreeSet<<A as ThriftAdapter>::StandardType>
type StandardType = BTreeSet<<A as ThriftAdapter>::StandardType>
Aka the “from” type.
Source§type AdaptedType = BTreeSet<<A as ThriftAdapter>::AdaptedType>
type AdaptedType = BTreeSet<<A as ThriftAdapter>::AdaptedType>
Aka the “to” type.
Source§type Error = <A as ThriftAdapter>::Error
type Error = <A as ThriftAdapter>::Error
The error type thrown if
from_thrift fails during deserialization.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<A> Freeze for SetMapAdapter<A>
impl<A> RefUnwindSafe for SetMapAdapter<A>where
A: RefUnwindSafe,
impl<A> Send for SetMapAdapter<A>where
A: Send,
impl<A> Sync for SetMapAdapter<A>where
A: Sync,
impl<A> Unpin for SetMapAdapter<A>where
A: Unpin,
impl<A> UnwindSafe for SetMapAdapter<A>where
A: 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