ShapeVisitor

Trait ShapeVisitor 

Source
pub trait ShapeVisitor<Output = ()> {
    type Error: Error;
    type Output;

Show 14 methods // Required method fn default(&mut self, shape: &Shape) -> Result<Self::Output, Self::Error>; // Provided methods fn visit_bool( &mut self, shape: &Shape, value: &Option<bool>, ) -> Result<Self::Output, Self::Error> { ... } fn visit_string( &mut self, shape: &Shape, value: &Option<String>, ) -> Result<Self::Output, Self::Error> { ... } fn visit_int( &mut self, shape: &Shape, value: &Option<i64>, ) -> Result<Self::Output, Self::Error> { ... } fn visit_float( &mut self, shape: &Shape, ) -> Result<Self::Output, Self::Error> { ... } fn visit_null(&mut self, shape: &Shape) -> Result<Self::Output, Self::Error> { ... } fn visit_array( &mut self, shape: &Shape, prefix: &[Shape], tail: &Shape, ) -> Result<Self::Output, Self::Error> { ... } fn visit_object( &mut self, shape: &Shape, fields: &IndexMap<String, Shape>, rest: &Shape, ) -> Result<Self::Output, Self::Error> { ... } fn visit_one( &mut self, shape: &Shape, one: &One, ) -> Result<Self::Output, Self::Error> { ... } fn visit_name( &mut self, shape: &Shape, name: &Located<String>, subpath: &[Located<NamedShapePathKey>], ) -> Result<Self::Output, Self::Error> { ... } fn visit_unknown( &mut self, shape: &Shape, ) -> Result<Self::Output, Self::Error> { ... } fn visit_none(&mut self, shape: &Shape) -> Result<Self::Output, Self::Error> { ... } fn visit_error( &mut self, shape: &Shape, err: &Error, ) -> Result<Self::Output, Self::Error> { ... } fn visit_all( &mut self, shape: &Shape, all: &All, ) -> Result<Self::Output, Self::Error> { ... }
}

Required Associated Types§

Required Methods§

Source

fn default(&mut self, shape: &Shape) -> Result<Self::Output, Self::Error>

Provided Methods§

Source

fn visit_bool( &mut self, shape: &Shape, value: &Option<bool>, ) -> Result<Self::Output, Self::Error>

Source

fn visit_string( &mut self, shape: &Shape, value: &Option<String>, ) -> Result<Self::Output, Self::Error>

Source

fn visit_int( &mut self, shape: &Shape, value: &Option<i64>, ) -> Result<Self::Output, Self::Error>

Source

fn visit_float(&mut self, shape: &Shape) -> Result<Self::Output, Self::Error>

Source

fn visit_null(&mut self, shape: &Shape) -> Result<Self::Output, Self::Error>

Source

fn visit_array( &mut self, shape: &Shape, prefix: &[Shape], tail: &Shape, ) -> Result<Self::Output, Self::Error>

Source

fn visit_object( &mut self, shape: &Shape, fields: &IndexMap<String, Shape>, rest: &Shape, ) -> Result<Self::Output, Self::Error>

Source

fn visit_one( &mut self, shape: &Shape, one: &One, ) -> Result<Self::Output, Self::Error>

Source

fn visit_name( &mut self, shape: &Shape, name: &Located<String>, subpath: &[Located<NamedShapePathKey>], ) -> Result<Self::Output, Self::Error>

Source

fn visit_unknown(&mut self, shape: &Shape) -> Result<Self::Output, Self::Error>

Source

fn visit_none(&mut self, shape: &Shape) -> Result<Self::Output, Self::Error>

Source

fn visit_error( &mut self, shape: &Shape, err: &Error, ) -> Result<Self::Output, Self::Error>

Source

fn visit_all( &mut self, shape: &Shape, all: &All, ) -> Result<Self::Output, Self::Error>

Implementors§