DefaultDecode

Trait DefaultDecode 

pub trait DefaultDecode: Decode<()> {
    // Provided method
    fn decode<D>(decoder: &mut D) -> Result<Self, DecodeError>
       where D: Decoder<Context = ()>,
             Self: Sized { ... }
}
Expand description

Decode with the default () context to avoid repeated generic arguments.

Provided Methods§

fn decode<D>(decoder: &mut D) -> Result<Self, DecodeError>
where D: Decoder<Context = ()>, Self: Sized,

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.

Implementors§

§

impl<T> DefaultDecode for T
where T: Decode<()>,