pub trait SerializeAs<T: ?Sized> {
    // Required method
    fn serialize_as<S>(source: &T, serializer: S) -> Result<S::Ok, S::Error>
       where S: Serializer;
}
Expand description

A data structure that can be serialized into any data format supported by Serde, analogue to Serialize.

The trait is analogue to the serde::Serialize trait, with the same meaning of input and output arguments. It can and should be implemented using the same code structure as the Serialize trait. As such, the same advice for implementing Serialize applies here.

Differences to Serialize

The trait is only required for container-like types or types implementing specific conversion functions. Container-like types are Vec, BTreeMap, but also Option and Box. Conversion types serialize into a different serde data type. For example, DisplayFromStr uses the Display trait to serialize a String and DurationSeconds converts a Duration into either String or integer values.

This code shows how to implement Serialize for Box:

impl<T> Serialize for Box<T>
where
    T: Serialize,
{
    #[inline]
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        (**self).serialize(serializer)
    }
}

and this code shows how to do the same using SerializeAs:

impl<T, U> SerializeAs<Box<T>> for Box<U>
where
    U: SerializeAs<T>,
{
    fn serialize_as<S>(source: &Box<T>, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        SerializeAsWrap::<T, U>::new(source).serialize(serializer)
    }
}

It uses two type parameters, T and U instead of only one and performs the serialization step using the SerializeAsWrap type. The T type is the on the Rust side before serialization, whereas the U type determines how the value will be serialized. These two changes are usually enough to make a container type implement SerializeAs.

SerializeAsWrap is a piece of glue code which turns SerializeAs into a serde compatible datatype, by converting all calls to serialize into serialize_as. This allows us to implement SerializeAs such that it can be applied recursively throughout the whole data structure. This is mostly important for container types, such as Vec or BTreeMap. In a BTreeMap this allows us to specify two different serialization behaviors, one for key and one for value, using the SerializeAs trait.

Implementing a converter Type

This shows a simplified implementation for DisplayFromStr.

struct DisplayFromStr;

impl<T> SerializeAs<T> for DisplayFromStr
where
    T: Display,
{
    fn serialize_as<S>(source: &T, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        serializer.collect_str(&source)
    }
}

Required Methods§

source

fn serialize_as<S>(source: &T, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

Serialize this value into the given Serde serializer.

Implementations on Foreign Types§

source§

impl<K, KAs, V, VAs> SerializeAs<[(K, V)]> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>(source: &[(K, V)], serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<Vec<(K, V), Global>> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &Vec<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0> SerializeAs<(T0,)> for (As0,)where As0: SerializeAs<T0>,

source§

fn serialize_as<S>(tuple: &(T0,), serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2> SerializeAs<(T0, T1, T2)> for (As0, As1, As2)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>,

source§

fn serialize_as<S>( tuple: &(T0, T1, T2), serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<'a, T, U> SerializeAs<&'a mut T> for &'a mut Uwhere U: SerializeAs<T> + ?Sized, T: ?Sized,

source§

fn serialize_as<S>(source: &&'a mut T, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<Option<T>> for Option<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &Option<T>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6, T7, As7, T8, As8, T9, As9, T10, As10, T11, As11, T12, As12, T13, As13, T14, As14> SerializeAs<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> for (As0, As1, As2, As3, As4, As5, As6, As7, As8, As9, As10, As11, As12, As13, As14)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>, As7: SerializeAs<T7>, As8: SerializeAs<T8>, As9: SerializeAs<T9>, As10: SerializeAs<T10>, As11: SerializeAs<T11>, As12: SerializeAs<T12>, As13: SerializeAs<T13>, As14: SerializeAs<T14>,

source§

impl<K, KU, V, VU, H> SerializeAs<IndexMap<K, V, H>> for IndexMap<KU, VU, H>where KU: SerializeAs<K>, VU: SerializeAs<V>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &IndexMap<K, V, H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<Option<(K, V)>> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &Option<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5> SerializeAs<(T0, T1, T2, T3, T4, T5)> for (As0, As1, As2, As3, As4, As5)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>,

source§

fn serialize_as<S>( tuple: &(T0, T1, T2, T3, T4, T5), serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<BTreeSet<(K, V), Global>> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &BTreeSet<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<RefCell<T>> for RefCell<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>( source: &RefCell<T>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs, H> SerializeAs<IndexSet<(K, V), H>> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &IndexSet<(K, V), H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<VecDeque<(K, V), Global>> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &VecDeque<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<LinkedList<T, Global>> for LinkedList<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>( source: &LinkedList<T>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs, const N: usize> SerializeAs<[(K, V); N]> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &[(K, V); N], serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3> SerializeAs<(T0, T1, T2, T3)> for (As0, As1, As2, As3)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>,

source§

fn serialize_as<S>( tuple: &(T0, T1, T2, T3), serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6, T7, As7, T8, As8, T9, As9, T10, As10, T11, As11, T12, As12> SerializeAs<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for (As0, As1, As2, As3, As4, As5, As6, As7, As8, As9, As10, As11, As12)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>, As7: SerializeAs<T7>, As8: SerializeAs<T8>, As9: SerializeAs<T9>, As10: SerializeAs<T10>, As11: SerializeAs<T11>, As12: SerializeAs<T12>,

source§

impl<K, KAs, V, VAs> SerializeAs<BTreeMap<K, V, Global>> for Vec<(KAs, VAs)>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &BTreeMap<K, V>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6, T7, As7, T8, As8, T9, As9, T10, As10, T11, As11, T12, As12, T13, As13, T14, As14, T15, As15> SerializeAs<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> for (As0, As1, As2, As3, As4, As5, As6, As7, As8, As9, As10, As11, As12, As13, As14, As15)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>, As7: SerializeAs<T7>, As8: SerializeAs<T8>, As9: SerializeAs<T9>, As10: SerializeAs<T10>, As11: SerializeAs<T11>, As12: SerializeAs<T12>, As13: SerializeAs<T13>, As14: SerializeAs<T14>, As15: SerializeAs<T15>,

source§

impl<T, As, const N: usize> SerializeAs<[T; N]> for [As; N]where As: SerializeAs<T>,

source§

fn serialize_as<S>(array: &[T; N], serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<[(K, V)]> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>(source: &[(K, V)], serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<const CONFIG: EncodedConfig> SerializeAs<OffsetDateTime> for Iso8601<CONFIG>

Available on crate feature time_0_3 only.
source§

fn serialize_as<S>( datetime: &OffsetDateTime, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<BinaryHeap<(K, V)>> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &BinaryHeap<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4> SerializeAs<(T0, T1, T2, T3, T4)> for (As0, As1, As2, As3, As4)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>,

source§

fn serialize_as<S>( tuple: &(T0, T1, T2, T3, T4), serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<[T]> for [U]where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &[T], serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, TAs, E, EAs> SerializeAs<Result<T, E>> for Result<TAs, EAs>where TAs: SerializeAs<T>, EAs: SerializeAs<E>,

source§

fn serialize_as<S>( source: &Result<T, E>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl SerializeAs<OffsetDateTime> for Rfc3339

Available on crate feature time_0_3 only.
source§

fn serialize_as<S>( datetime: &OffsetDateTime, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<Arc<T>> for Arc<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &Arc<T>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<Box<[T], Global>> for Box<[U]>where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &Box<[T]>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs, H> SerializeAs<IndexMap<K, V, H>> for Vec<(KAs, VAs)>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &IndexMap<K, V, H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6, T7, As7, T8, As8> SerializeAs<(T0, T1, T2, T3, T4, T5, T6, T7, T8)> for (As0, As1, As2, As3, As4, As5, As6, As7, As8)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>, As7: SerializeAs<T7>, As8: SerializeAs<T8>,

source§

fn serialize_as<S>( tuple: &(T0, T1, T2, T3, T4, T5, T6, T7, T8), serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<Mutex<T>> for Mutex<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &Mutex<T>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<Weak<T>> for RcWeak<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &RcWeak<T>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<BinaryHeap<T>> for BinaryHeap<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>( source: &BinaryHeap<T>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U, H> SerializeAs<HashSet<T, H>> for HashSet<U, H>where U: SerializeAs<T>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &HashSet<T, H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1> SerializeAs<(T0, T1)> for (As0, As1)where As0: SerializeAs<T0>, As1: SerializeAs<T1>,

source§

fn serialize_as<S>(tuple: &(T0, T1), serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6, T7, As7, T8, As8, T9, As9, T10, As10, T11, As11> SerializeAs<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for (As0, As1, As2, As3, As4, As5, As6, As7, As8, As9, As10, As11)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>, As7: SerializeAs<T7>, As8: SerializeAs<T8>, As9: SerializeAs<T9>, As10: SerializeAs<T10>, As11: SerializeAs<T11>,

source§

impl<T, U> SerializeAs<Weak<T>> for ArcWeak<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>( source: &ArcWeak<T>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<'a, T, U> SerializeAs<&'a T> for &'a Uwhere U: SerializeAs<T> + ?Sized, T: ?Sized,

source§

fn serialize_as<S>(source: &&'a T, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<RwLock<T>> for RwLock<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &RwLock<T>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<Vec<T, Global>> for Vec<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &Vec<T>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<LinkedList<(K, V), Global>> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &LinkedList<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6, T7, As7, T8, As8, T9, As9, T10, As10, T11, As11, T12, As12, T13, As13> SerializeAs<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> for (As0, As1, As2, As3, As4, As5, As6, As7, As8, As9, As10, As11, As12, As13)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>, As7: SerializeAs<T7>, As8: SerializeAs<T8>, As9: SerializeAs<T9>, As10: SerializeAs<T10>, As11: SerializeAs<T11>, As12: SerializeAs<T12>, As13: SerializeAs<T13>,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6, T7, As7, T8, As8, T9, As9, T10, As10> SerializeAs<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for (As0, As1, As2, As3, As4, As5, As6, As7, As8, As9, As10)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>, As7: SerializeAs<T7>, As8: SerializeAs<T8>, As9: SerializeAs<T9>, As10: SerializeAs<T10>,

source§

impl<T, U> SerializeAs<Box<T, Global>> for Box<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &Box<T>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<Option<(K, V)>> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &Option<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<LinkedList<(K, V), Global>> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &LinkedList<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<BinaryHeap<(K, V)>> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &BinaryHeap<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U, H> SerializeAs<IndexSet<T, H>> for IndexSet<U, H>where U: SerializeAs<T>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &IndexSet<T, H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl SerializeAs<OffsetDateTime> for Rfc2822

Available on crate feature time_0_3 only.
source§

fn serialize_as<S>( datetime: &OffsetDateTime, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<Cell<T>> for Cell<U>where U: SerializeAs<T>, T: Copy,

source§

fn serialize_as<S>(source: &Cell<T>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KU, V, VU> SerializeAs<BTreeMap<K, V, Global>> for BTreeMap<KU, VU>where KU: SerializeAs<K>, VU: SerializeAs<V>,

source§

fn serialize_as<S>( source: &BTreeMap<K, V>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<VecDeque<T, Global>> for VecDeque<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>( source: &VecDeque<T>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs, H> SerializeAs<IndexSet<(K, V), H>> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &IndexSet<(K, V), H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs, const N: usize> SerializeAs<[(K, V); N]> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &[(K, V); N], serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs, H> SerializeAs<HashMap<K, V, H>> for Vec<(KAs, VAs)>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &HashMap<K, V, H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<BTreeSet<(K, V), Global>> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &BTreeSet<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs, H> SerializeAs<HashSet<(K, V), H>> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &HashSet<(K, V), H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<Box<[(K, V)], Global>> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &Box<[(K, V)]>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<Vec<(K, V), Global>> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &Vec<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KU, V, VU, H> SerializeAs<HashMap<K, V, H>> for HashMap<KU, VU, H>where KU: SerializeAs<K>, VU: SerializeAs<V>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &HashMap<K, V, H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<Box<[(K, V)], Global>> for HashMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &Box<[(K, V)]>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6, T7, As7> SerializeAs<(T0, T1, T2, T3, T4, T5, T6, T7)> for (As0, As1, As2, As3, As4, As5, As6, As7)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>, As7: SerializeAs<T7>,

source§

fn serialize_as<S>( tuple: &(T0, T1, T2, T3, T4, T5, T6, T7), serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<Rc<T>> for Rc<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>(source: &Rc<T>, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6, T7, As7, T8, As8, T9, As9> SerializeAs<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> for (As0, As1, As2, As3, As4, As5, As6, As7, As8, As9)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>, As7: SerializeAs<T7>, As8: SerializeAs<T8>, As9: SerializeAs<T9>,

source§

fn serialize_as<S>( tuple: &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9), serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs, H> SerializeAs<HashSet<(K, V), H>> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

fn serialize_as<S>( source: &HashSet<(K, V), H>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T, U> SerializeAs<BTreeSet<T, Global>> for BTreeSet<U>where U: SerializeAs<T>,

source§

fn serialize_as<S>( source: &BTreeSet<T>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<T0, As0, T1, As1, T2, As2, T3, As3, T4, As4, T5, As5, T6, As6> SerializeAs<(T0, T1, T2, T3, T4, T5, T6)> for (As0, As1, As2, As3, As4, As5, As6)where As0: SerializeAs<T0>, As1: SerializeAs<T1>, As2: SerializeAs<T2>, As3: SerializeAs<T3>, As4: SerializeAs<T4>, As5: SerializeAs<T5>, As6: SerializeAs<T6>,

source§

fn serialize_as<S>( tuple: &(T0, T1, T2, T3, T4, T5, T6), serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

source§

impl<K, KAs, V, VAs> SerializeAs<VecDeque<(K, V), Global>> for BTreeMap<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

fn serialize_as<S>( source: &VecDeque<(K, V)>, serializer: S ) -> Result<S::Ok, S::Error>where S: Serializer,

Implementors§

source§

impl SerializeAs<&[u8]> for Bytes

source§

impl SerializeAs<NaiveDateTime> for DateTime<Utc>

Available on crate feature chrono_0_4 only.
source§

impl SerializeAs<Box<[u8], Global>> for Bytes

source§

impl SerializeAs<Vec<u8, Global>> for Bytes

source§

impl SerializeAs<Vec<u8, Global>> for BytesOrString

source§

impl<'a> SerializeAs<Cow<'a, str>> for BorrowCow

source§

impl<'a> SerializeAs<Cow<'a, [u8]>> for BorrowCow

source§

impl<'a> SerializeAs<Cow<'a, [u8]>> for Bytes

source§

impl<'a, const N: usize> SerializeAs<Cow<'a, [u8; N]>> for BorrowCow

source§

impl<'a, const N: usize> SerializeAs<Cow<'a, [u8; N]>> for Bytes

source§

impl<K, KAs, V, VAs> SerializeAs<Option<(K, V)>> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<Box<[(K, V)], Global>> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<BinaryHeap<(K, V)>> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<BTreeMap<K, V, Global>> for MapFirstKeyWins<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<BTreeMap<K, V, Global>> for MapPreventDuplicates<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<BTreeMap<K, V, Global>> for Seq<(KAs, VAs)>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<BTreeSet<(K, V), Global>> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<LinkedList<(K, V), Global>> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<VecDeque<(K, V), Global>> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<Vec<(K, V), Global>> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs> SerializeAs<[(K, V)]> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<K, KAs, V, VAs, H> SerializeAs<HashMap<K, V, H>> for MapFirstKeyWins<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

impl<K, KAs, V, VAs, H> SerializeAs<HashMap<K, V, H>> for MapPreventDuplicates<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

impl<K, KAs, V, VAs, H> SerializeAs<HashMap<K, V, H>> for Seq<(KAs, VAs)>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

impl<K, KAs, V, VAs, H> SerializeAs<HashSet<(K, V), H>> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

impl<K, KAs, V, VAs, H> SerializeAs<IndexMap<K, V, H>> for MapFirstKeyWins<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

impl<K, KAs, V, VAs, H> SerializeAs<IndexMap<K, V, H>> for MapPreventDuplicates<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

impl<K, KAs, V, VAs, H> SerializeAs<IndexMap<K, V, H>> for Seq<(KAs, VAs)>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

impl<K, KAs, V, VAs, H> SerializeAs<IndexSet<(K, V), H>> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>, H: ?Sized + Sized,

source§

impl<K, KAs, V, VAs, const N: usize> SerializeAs<[(K, V); N]> for Map<KAs, VAs>where KAs: SerializeAs<K>, VAs: SerializeAs<V>,

source§

impl<SEPARATOR, I, T> SerializeAs<I> for StringWithSeparator<SEPARATOR, T>where SEPARATOR: Separator, for<'x> &'x I: IntoIterator<Item = &'x T>, T: Display,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMicroSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMicroSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMicroSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMicroSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMicroSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMilliSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMilliSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMilliSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMilliSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampMilliSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampNanoSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampNanoSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampNanoSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampNanoSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampNanoSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<NaiveDateTime> for TimestampSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSeconds<u64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSeconds<u64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<u64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSeconds<u64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMicroSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMicroSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMicroSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMicroSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMicroSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMilliSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMilliSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMilliSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMilliSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampMilliSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampNanoSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampNanoSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampNanoSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampNanoSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampNanoSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<SystemTime> for TimestampSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMicroSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationMilliSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationNanoSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<Duration> for DurationSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMicroSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMicroSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMicroSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMicroSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMicroSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMilliSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMilliSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMilliSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMilliSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampMilliSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampNanoSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampNanoSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampNanoSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampNanoSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampNanoSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<OffsetDateTime> for TimestampSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMicroSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMicroSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMicroSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMicroSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMicroSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMilliSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMilliSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMilliSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMilliSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampMilliSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampNanoSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampNanoSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampNanoSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampNanoSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampNanoSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampSeconds<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampSeconds<i64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampSeconds<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampSecondsWithFrac<f64, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS> SerializeAs<PrimitiveDateTime> for TimestampSecondsWithFrac<String, STRICTNESS>where STRICTNESS: Strictness,

Available on crate feature time_0_3 only.
source§

impl<STRICTNESS: Strictness> SerializeAs<bool> for BoolFromInt<STRICTNESS>

source§

impl<T> SerializeAs<Option<T>> for NoneAsEmptyStringwhere T: Display,

source§

impl<T> SerializeAs<Vec<T, Global>> for EnumMapwhere T: Serialize,

source§

impl<T> SerializeAs<T> for Hex<Lowercase>where T: AsRef<[u8]>,

Available on crate feature hex only.
source§

impl<T> SerializeAs<T> for Hex<Uppercase>where T: AsRef<[u8]>,

Available on crate feature hex only.
source§

impl<T> SerializeAs<T> for DisplayFromStrwhere T: Display,

source§

impl<T> SerializeAs<T> for Samewhere T: Serialize + ?Sized,

source§

impl<T, CHARSET> SerializeAs<T> for Base64<CHARSET, Padded>where T: AsRef<[u8]>, CHARSET: CharacterSet,

Available on crate feature base64 only.
source§

impl<T, CHARSET> SerializeAs<T> for Base64<CHARSET, Unpadded>where T: AsRef<[u8]>, CHARSET: CharacterSet,

Available on crate feature base64 only.
source§

impl<T, TAs1> SerializeAs<T> for PickFirst<(TAs1,)>where TAs1: SerializeAs<T>,

source§

impl<T, TAs1, TAs2> SerializeAs<T> for PickFirst<(TAs1, TAs2)>where TAs1: SerializeAs<T>,

source§

impl<T, TAs1, TAs2, TAs3> SerializeAs<T> for PickFirst<(TAs1, TAs2, TAs3)>where TAs1: SerializeAs<T>,

source§

impl<T, TAs1, TAs2, TAs3, TAs4> SerializeAs<T> for PickFirst<(TAs1, TAs2, TAs3, TAs4)>where TAs1: SerializeAs<T>,

source§

impl<T, TAs> SerializeAs<BTreeSet<T, Global>> for SetLastValueWins<TAs>where TAs: SerializeAs<T>,

source§

impl<T, TAs> SerializeAs<BTreeSet<T, Global>> for SetPreventDuplicates<TAs>where TAs: SerializeAs<T>,

source§

impl<T, TAs> SerializeAs<Vec<T, Global>> for KeyValueMap<TAs>where TAs: SerializeAs<T>,

source§

impl<T, TAs> SerializeAs<T> for JsonString<TAs>where TAs: SerializeAs<T>,

Available on crate feature json only.
source§

impl<T, TAs> SerializeAs<T> for DefaultOnError<TAs>where TAs: SerializeAs<T>,

source§

impl<T, TAs, H> SerializeAs<HashSet<T, H>> for SetLastValueWins<TAs>where TAs: SerializeAs<T>, H: ?Sized + Sized,

source§

impl<T, TAs, H> SerializeAs<HashSet<T, H>> for SetPreventDuplicates<TAs>where TAs: SerializeAs<T>, H: ?Sized + Sized,

source§

impl<T, TAs, H> SerializeAs<IndexSet<T, H>> for SetLastValueWins<TAs>where TAs: SerializeAs<T>, H: ?Sized + Sized,

source§

impl<T, TAs, H> SerializeAs<IndexSet<T, H>> for SetPreventDuplicates<TAs>where TAs: SerializeAs<T>, H: ?Sized + Sized,

source§

impl<T, U> SerializeAs<Vec<T, Global>> for OneOrMany<U, PreferMany>where U: SerializeAs<T>,

source§

impl<T, U> SerializeAs<Vec<T, Global>> for OneOrMany<U, PreferOne>where U: SerializeAs<T>,

source§

impl<T, U> SerializeAs<Vec<T, Global>> for VecSkipError<U>where U: SerializeAs<T>,

source§

impl<T, U> SerializeAs<T> for DefaultOnNull<U>where U: SerializeAs<T>,

source§

impl<T, U> SerializeAs<T> for FromInto<U>where T: Into<U> + Clone, U: Serialize,

source§

impl<T, U> SerializeAs<T> for TryFromInto<U>where T: TryInto<U> + Clone, <T as TryInto<U>>::Error: Display, U: Serialize,

source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMicroSeconds<f64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMicroSeconds<i64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMicroSeconds<String, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMicroSecondsWithFrac<f64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMicroSecondsWithFrac<String, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMilliSeconds<f64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMilliSeconds<i64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMilliSeconds<String, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMilliSecondsWithFrac<f64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampMilliSecondsWithFrac<String, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampNanoSeconds<f64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampNanoSeconds<i64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampNanoSeconds<String, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampNanoSecondsWithFrac<f64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampNanoSecondsWithFrac<String, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampSeconds<f64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampSeconds<i64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampSeconds<String, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampSecondsWithFrac<f64, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<TZ, STRICTNESS> SerializeAs<DateTime<TZ>> for TimestampSecondsWithFrac<String, STRICTNESS>where TZ: TimeZone, STRICTNESS: Strictness,

Available on crate feature chrono_0_4 only.
source§

impl<const N: usize> SerializeAs<&[u8; N]> for Bytes

source§

impl<const N: usize> SerializeAs<Box<[u8; N], Global>> for Bytes

source§

impl<const N: usize> SerializeAs<[u8; N]> for Bytes