pub trait ShapeVisitor<Output = ()> {
type Error: Error;
type Output;
Show 13 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: &Name,
weak: &WeakScope,
) -> 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_all(
&mut self,
shape: &Shape,
all: &All,
) -> Result<Self::Output, Self::Error> { ... }
}Required Associated Types§
Required Methods§
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: &Name, weak: &WeakScope, ) -> 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_all( &mut self, shape: &Shape, all: &All, ) -> Result<Self::Output, Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".