pub struct Same;
Expand description
Adapter to convert from serde_as
to the serde traits.
This is the counter-type to As
.
It can be used whenever a type implementing DeserializeAs
/SerializeAs
is required but the normal Deserialize
/Serialize
traits should be used.
Check As
for an example.
Trait Implementations§
Source§impl<'de, T: Deserialize<'de>> DeserializeAs<'de, T> for Same
impl<'de, T: Deserialize<'de>> DeserializeAs<'de, T> for Same
Source§fn deserialize_as<D>(deserializer: D) -> Result<T, D::Error>where
D: Deserializer<'de>,
fn deserialize_as<D>(deserializer: D) -> Result<T, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer.
Source§impl<T> SerializeAs<T> for Same
impl<T> SerializeAs<T> for Same
Source§fn serialize_as<S>(source: &T, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
fn serialize_as<S>(source: &T, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
Serialize this value into the given Serde serializer.
Auto Trait Implementations§
impl Freeze for Same
impl RefUnwindSafe for Same
impl Send for Same
impl Sync for Same
impl Unpin for Same
impl UnwindSafe for Same
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