Skip to main content

Keyword

Trait Keyword 

Source
pub trait Keyword:
    Send
    + Sync
    + Any {
    // Required method
    fn compile(&self, def: &Value, ctx: &WalkContext<'_>) -> KeywordResult;

    // Provided methods
    fn is_exclusive(&self, _version: SchemaVersion) -> bool { ... }
    fn place_first(&self) -> bool { ... }
    fn place_last(&self) -> bool { ... }
}

Required Methods§

Source

fn compile(&self, def: &Value, ctx: &WalkContext<'_>) -> KeywordResult

Provided Methods§

Source

fn is_exclusive(&self, _version: SchemaVersion) -> bool

Source

fn place_first(&self) -> bool

Source

fn place_last(&self) -> bool

Trait Implementations§

Source§

impl Debug for dyn Keyword + 'static

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§