Decode

Trait Decode 

Source
pub trait Decode {
    // Required method
    fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self;
}
Expand description

A type that can be decoded from a layout, symbols and a visitor.

Required Methods§

Source

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Creates a value of Self corresponding to the supplied information.

The input parameters are already guaranteed to be correctly formed. Therefore, no decode errors are expected from this function. If necessary, this code should panic, indicating a bug in the caller code.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Decode for Value

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for bool

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for f32

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for f64

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for i8

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for i16

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for i32

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for i64

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for isize

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for u8

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for u16

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for u32

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for u64

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for ()

Source§

fn build(layout: &Layout, _: &dyn Sym, _: &mut Visitor) -> Self

Source§

impl Decode for usize

Source§

fn build(layout: &Layout, _: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl Decode for String

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A> Decode for (A,)
where A: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B> Decode for (A, B)
where A: Decode, B: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B, C> Decode for (A, B, C)
where A: Decode, B: Decode, C: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B, C, D> Decode for (A, B, C, D)
where A: Decode, B: Decode, C: Decode, D: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B, C, D, E> Decode for (A, B, C, D, E)
where A: Decode, B: Decode, C: Decode, D: Decode, E: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B, C, D, E, F> Decode for (A, B, C, D, E, F)
where A: Decode, B: Decode, C: Decode, D: Decode, E: Decode, F: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B, C, D, E, F, G> Decode for (A, B, C, D, E, F, G)
where A: Decode, B: Decode, C: Decode, D: Decode, E: Decode, F: Decode, G: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B, C, D, E, F, G, H> Decode for (A, B, C, D, E, F, G, H)
where A: Decode, B: Decode, C: Decode, D: Decode, E: Decode, F: Decode, G: Decode, H: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B, C, D, E, F, G, H, I> Decode for (A, B, C, D, E, F, G, H, I)
where A: Decode, B: Decode, C: Decode, D: Decode, E: Decode, F: Decode, G: Decode, H: Decode, I: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B, C, D, E, F, G, H, I, J> Decode for (A, B, C, D, E, F, G, H, I, J)
where A: Decode, B: Decode, C: Decode, D: Decode, E: Decode, F: Decode, G: Decode, H: Decode, I: Decode, J: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> Decode for (A, B, C, D, E, F, G, H, I, J, K)
where A: Decode, B: Decode, C: Decode, D: Decode, E: Decode, F: Decode, G: Decode, H: Decode, I: Decode, J: Decode, K: Decode,

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<T: Decode> Decode for Box<T>

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<T: Decode> Decode for BTreeMap<String, T>

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<T: Decode> Decode for Rc<T>

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<T: Decode> Decode for Arc<T>

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<T: Decode> Decode for Vec<T>

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Source§

impl<T: Decode> Decode for HashMap<String, T>

Source§

fn build(layout: &Layout, symbols: &dyn Sym, visitor: &mut Visitor) -> Self

Implementors§