Trait rocket::serde::Serialize[][src]

pub trait Serialize {
    fn serialize<S>(
        &self,
        serializer: S
    ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where
        S: Serializer
; }
Expand description

A data structure that can be serialized into any data format supported by Serde.

Serde provides Serialize implementations for many Rust primitive and standard library types. The complete list is here. All of these can be serialized using Serde out of the box.

Additionally, Serde provides a procedural macro called serde_derive to automatically generate Serialize implementations for structs and enums in your program. See the derive section of the manual for how to use this.

In rare cases it may be necessary to implement Serialize manually for some type in your program. See the Implementing Serialize section of the manual for more about this.

Third-party crates may provide Serialize implementations for types that they expose. For example the linked-hash-map crate provides a LinkedHashMap<K, V> type that is serializable by Serde because the crate provides an implementation of Serialize for it.

Required methods

fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer.

See the Implementing Serialize section of the manual for more information about how to implement this method.

use serde::ser::{Serialize, SerializeStruct, Serializer};

struct Person {
    name: String,
    age: u8,
    phones: Vec<String>,
}

// This is what #[derive(Serialize)] would generate.
impl Serialize for Person {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: Serializer,
    {
        let mut s = serializer.serialize_struct("Person", 3)?;
        s.serialize_field("name", &self.name)?;
        s.serialize_field("age", &self.age)?;
        s.serialize_field("phones", &self.phones)?;
        s.end()
    }
}

Implementations on Foreign Types

impl Serialize for RelativePathBuf[src]

pub fn serialize<__S>(
    &self,
    __serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
    __S: Serializer
[src]

impl Serialize for Empty[src]

pub fn serialize<S>(
    &self,
    ser: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Value[src]

pub fn serialize<S>(
    &self,
    ser: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<A, B> Serialize for Either<A, B> where
    B: Serialize,
    A: Serialize
[src]

pub fn serialize<__S>(
    &self,
    __serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
    __S: Serializer
[src]

impl<T> Serialize for Tagged<T> where
    T: Serialize
[src]

pub fn serialize<__S>(
    &self,
    __serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
    __S: Serializer
[src]

impl Serialize for Num[src]

pub fn serialize<S>(
    &self,
    ser: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Tag[src]

pub fn serialize<S>(
    &self,
    ser: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Profile[src]

pub fn serialize<S>(
    &self,
    s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicIsize[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for Mutex<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicU8[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicBool[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize,
    T7: Serialize,
    T8: Serialize,
    T9: Serialize,
    T10: Serialize,
    T11: Serialize,
    T12: Serialize,
    T13: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 26] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 25] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<'a, T> Serialize for Cow<'a, T> where
    T: Serialize + ToOwned + ?Sized
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for u8[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3> Serialize for (T0, T1, T2, T3) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for SocketAddr[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 6] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 12] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<Idx> Serialize for Range<Idx> where
    Idx: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for i32[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for LinkedList<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 21] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 27] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize,
    T7: Serialize,
    T8: Serialize,
    T9: Serialize,
    T10: Serialize,
    T11: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicI32[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for char[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroU16[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicU32[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for f64[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 4] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for OsString[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroI8[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroIsize[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize,
    T7: Serialize,
    T8: Serialize,
    T9: Serialize,
    T10: Serialize,
    T11: Serialize,
    T12: Serialize,
    T13: Serialize,
    T14: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for u128[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 31] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 10] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 2] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 1] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for bool[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 30] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 15] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T, H> Serialize for HashSet<T, H> where
    T: Serialize + Eq + Hash,
    H: BuildHasher
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Duration[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for isize[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for usize[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<'a> Serialize for Arguments<'a>[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 9] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for RefCell<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for Wrapping<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1> Serialize for (T0, T1) where
    T0: Serialize,
    T1: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T, E> Serialize for Result<T, E> where
    T: Serialize,
    E: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<K, V, H> Serialize for HashMap<K, V, H> where
    V: Serialize,
    H: BuildHasher,
    K: Serialize + Eq + Hash
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for CString[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroI64[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroI16[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2> Serialize for (T0, T1, T2) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6> Serialize for (T0, T1, T2, T3, T4, T5, T6) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicU64[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 11] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Ipv4Addr[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<Idx> Serialize for RangeInclusive<Idx> where
    Idx: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize,
    T7: Serialize,
    T8: Serialize,
    T9: Serialize,
    T10: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for Reverse<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 22] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for u32[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for RwLock<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 8] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Ipv6Addr[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 3] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 19] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize,
    T7: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for u16[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroI128[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<'a, T> Serialize for &'a T where
    T: Serialize + ?Sized
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for Box<T, Global> where
    T: Serialize + ?Sized
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 16] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicU16[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 14] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicI8[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for i128[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 18] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for String[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for Bound<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 32] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0> Serialize for (T0,) where
    T0: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5> Serialize for (T0, T1, T2, T3, T4, T5) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for Cell<T> where
    T: Serialize + Copy
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<'a, T> Serialize for &'a mut T where
    T: Serialize + ?Sized
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize,
    T7: Serialize,
    T8: Serialize,
    T9: Serialize,
    T10: Serialize,
    T11: Serialize,
    T12: Serialize,
    T13: Serialize,
    T14: Serialize,
    T15: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroU8[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroI32[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<K, V> Serialize for BTreeMap<K, V> where
    V: Serialize,
    K: Serialize + Ord
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for CStr[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 23] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 7] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for PhantomData<T> where
    T: ?Sized
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for ()[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroUsize[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for f32[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for SocketAddrV6[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroU128[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 24] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 28] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for u64[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for Vec<T, Global> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for PathBuf[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroU32[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for VecDeque<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4> Serialize for (T0, T1, T2, T3, T4) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for i8[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 17] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 20] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for SocketAddrV4[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 13] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 29] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for OsStr[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for NonZeroU64[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize,
    T7: Serialize,
    T8: Serialize,
    T9: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 5] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for SystemTime[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T; 0][src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for [T] where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for i64[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicI64[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for Option<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for BinaryHeap<T> where
    T: Serialize + Ord
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicUsize[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize,
    T7: Serialize,
    T8: Serialize,
    T9: Serialize,
    T10: Serialize,
    T11: Serialize,
    T12: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Path[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for BTreeSet<T> where
    T: Serialize + Ord
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for i16[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for IpAddr[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8) where
    T0: Serialize,
    T1: Serialize,
    T2: Serialize,
    T3: Serialize,
    T4: Serialize,
    T5: Serialize,
    T6: Serialize,
    T7: Serialize,
    T8: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for AtomicI16[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for str[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<T> Serialize for Spanned<T> where
    T: Serialize
[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Map<String, Value>[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Datetime[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Value[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<K, V, S> Serialize for IndexMap<K, V, S> where
    S: BuildHasher,
    V: Serialize,
    K: Serialize + Hash + Eq
[src]

Requires crate feature "serde" or "serde-1"

pub fn serialize<T>(
    &self,
    serializer: T
) -> Result<<T as Serializer>::Ok, <T as Serializer>::Error> where
    T: Serializer
[src]

impl<T, S> Serialize for IndexSet<T, S> where
    T: Serialize + Hash + Eq,
    S: BuildHasher
[src]

Requires crate feature "serde" or "serde-1"

pub fn serialize<Se>(
    &self,
    serializer: Se
) -> Result<<Se as Serializer>::Ok, <Se as Serializer>::Error> where
    Se: Serializer
[src]

impl Serialize for Number[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Map<String, Value>[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl<'a> Serialize for RawRef<'a>[src]

pub fn serialize<S>(
    &self,
    se: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Raw[src]

pub fn serialize<S>(
    &self,
    se: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

Implementors

impl Serialize for LogLevel[src]

fn serialize<S: Serializer>(&self, ser: S) -> Result<S::Ok, S::Error>[src]

impl Serialize for Sig[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

impl Serialize for rocket::serde::json::Value[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Config[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

impl Serialize for Ident[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

impl Serialize for Shutdown[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

impl Serialize for TlsConfig[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

impl Serialize for ByteUnit[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for Limits[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

impl Serialize for Key[src]

fn serialize<S>(&self, ser: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

impl Serialize for Name[src]

fn serialize<S>(&self, ser: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

impl Serialize for NameBuf<'_>[src]

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

impl Serialize for RawStr

pub fn serialize<S>(
    &self,
    ser: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer

impl Serialize for Uuid[src]

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

impl Serialize for FlashMessage<'_>[src]

fn serialize<S: Serializer>(&self, ser: S) -> Result<S::Ok, S::Error>[src]

impl<'a> Serialize for &'a UncasedStr

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer

impl<'a> Serialize for Uncased<'a>

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer

impl<'a> Serialize for Absolute<'a>

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer

impl<'a> Serialize for Asterisk

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer

impl<'a> Serialize for Authority<'a>

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer

impl<'a> Serialize for Origin<'a>

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer

impl<'a> Serialize for Reference<'a>

pub fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer

impl<'v> Serialize for Context<'v>[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

impl<'v> Serialize for Error<'v>[src]

fn serialize<S: Serializer>(&self, ser: S) -> Result<S::Ok, S::Error>[src]

impl<'v> Serialize for Errors<'v>[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]