serde::expected

Trait Expected

source
pub trait Expected {
    // Required method
    fn expected(&self) -> &'static str;
}
Expand description

To display an error when the expected type is different from the current value.

Required Methods§

source

fn expected(&self) -> &'static str

Implementations on Foreign Types§

source§

impl Expected for &'static str

source§

fn expected(&self) -> &'static str

Implementors§

source§

impl Expected for Number

source§

impl<T> Expected for T
where T: Visitor + ?Sized,