Struct serde_with::Same

source ·
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§

Deserialize this value from the given Serde deserializer.
Serialize this value into the given Serde serializer.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.