[][src]Enum serde_reflection::Format

pub enum Format {
    Variable(Variable<Format>),
    TypeName(String),
    Unit,
    Bool,
    I8,
    I16,
    I32,
    I64,
    I128,
    U8,
    U16,
    U32,
    U64,
    U128,
    F32,
    F64,
    Char,
    Str,
    Bytes,
    Option(Box<Format>),
    Seq(Box<Format>),
    Map {
        key: Box<Format>,
        value: Box<Format>,
    },
    Tuple(Vec<Format>),
    TupleArray {
        content: Box<Format>,
        size: usize,
    },
}

Serde-based serialization format for anonymous "value" types.

Variants

Variable(Variable<Format>)

A format whose value is initially unknown. Used internally for tracing. Not (de)serializable.

TypeName(String)

The name of a container.

Unit
Bool
I8
I16
I32
I64
I128
U8
U16
U32
U64
U128
F32
F64
Char
Str
Bytes
Option(Box<Format>)

The format of Option<T>.

Seq(Box<Format>)

A sequence, e.g. the format of Vec<Foo>.

Map

A map, e.g. the format of BTreeMap<K, V>.

Fields of Map

key: Box<Format>value: Box<Format>
Tuple(Vec<Format>)

A tuple, e.g. the format of (Foo, Bar).

TupleArray

Alias for (Foo, ... Foo). E.g. the format of [Foo; N].

Fields of TupleArray

content: Box<Format>size: usize

Implementations

impl Format[src]

pub fn unknown() -> Self[src]

Return a format made of a fresh variable with no known value.

Trait Implementations

impl Clone for Format[src]

impl Debug for Format[src]

impl Default for Format[src]

impl<'de> Deserialize<'de> for Format[src]

impl Eq for Format[src]

impl FormatHolder for Format[src]

fn unify(&mut self, format: Format) -> Result<()>[src]

Unify the newly "traced" value format into the current format. Note that there should be no TupleArrays at this point.

impl PartialEq<Format> for Format[src]

impl Serialize for Format[src]

impl StructuralEq for Format[src]

impl StructuralPartialEq for Format[src]

Auto Trait Implementations

impl !RefUnwindSafe for Format

impl !Send for Format

impl !Sync for Format

impl Unpin for Format

impl !UnwindSafe for Format

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.