Schematic

Trait Schematic 

Source
pub trait Schematic {
    // Required methods
    fn name() -> &'static str;
    fn required() -> bool;
    fn type_() -> &'static str;

    // Provided methods
    fn doc() -> Option<String> { ... }
    fn generate_schema() -> Schema { ... }
}

Required Methods§

Source

fn name() -> &'static str

Source

fn required() -> bool

Source

fn type_() -> &'static str

Provided Methods§

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 Schematic for bool

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for i8

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for i16

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for i32

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for i64

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for isize

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for u8

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for u16

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for u32

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for u64

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for usize

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl Schematic for String

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

impl<T> Schematic for Option<T>
where T: Schematic,

Source§

impl<T> Schematic for &T
where T: Schematic,

Source§

impl<T> Schematic for Vec<T>
where T: Schematic,

Source§

fn name() -> &'static str

Source§

fn required() -> bool

Source§

fn type_() -> &'static str

Source§

fn generate_schema() -> Schema

Implementors§