Trait Visitor

Source
pub trait Visitor {
    // Provided methods
    fn null(&mut self) -> Result<()> { ... }
    fn boolean(&mut self, b: bool) -> Result<()> { ... }
    fn string(&mut self, s: &str) -> Result<()> { ... }
    fn negative(&mut self, n: i64) -> Result<()> { ... }
    fn nonnegative(&mut self, n: u64) -> Result<()> { ... }
    fn float(&mut self, n: f64) -> Result<()> { ... }
    fn seq(&mut self) -> Result<Box<dyn Seq + '_>> { ... }
    fn map(&mut self) -> Result<Box<dyn Map + '_>> { ... }
}
Expand description

Trait that can write data into an output place.

Refer to the module documentation for examples.

Provided Methods§

Source

fn null(&mut self) -> Result<()>

Source

fn boolean(&mut self, b: bool) -> Result<()>

Source

fn string(&mut self, s: &str) -> Result<()>

Source

fn negative(&mut self, n: i64) -> Result<()>

Source

fn nonnegative(&mut self, n: u64) -> Result<()>

Source

fn float(&mut self, n: f64) -> Result<()>

Source

fn seq(&mut self) -> Result<Box<dyn Seq + '_>>

Source

fn map(&mut self) -> Result<Box<dyn Map + '_>>

Implementations§

Source§

impl dyn Visitor

Source

pub fn ignore() -> &'static mut dyn Visitor

Implementors§