Trait yajlish::Handler [−][src]
pub trait Handler {
fn handle_null(&mut self, ctx: &Context) -> Status;
fn handle_double(&mut self, ctx: &Context, val: f64) -> Status;
fn handle_int(&mut self, ctx: &Context, val: i64) -> Status;
fn handle_bool(&mut self, ctx: &Context, val: bool) -> Status;
fn handle_string(&mut self, ctx: &Context, val: &str) -> Status;
fn handle_start_map(&mut self, ctx: &Context) -> Status;
fn handle_end_map(&mut self, ctx: &Context) -> Status;
fn handle_map_key(&mut self, ctx: &Context, key: &str) -> Status;
fn handle_start_array(&mut self, ctx: &Context) -> Status;
fn handle_end_array(&mut self, ctx: &Context) -> Status;
}
Expand description
Implement this trait to handle parse events.
Required methods
fn handle_null(&mut self, ctx: &Context) -> Status
fn handle_null(&mut self, ctx: &Context) -> Status
Latest parsed value was a null.
fn handle_double(&mut self, ctx: &Context, val: f64) -> Status
fn handle_double(&mut self, ctx: &Context, val: f64) -> Status
Latest parsed value was a double.
fn handle_int(&mut self, ctx: &Context, val: i64) -> Status
fn handle_int(&mut self, ctx: &Context, val: i64) -> Status
Latest parsed value was an int.
fn handle_bool(&mut self, ctx: &Context, val: bool) -> Status
fn handle_bool(&mut self, ctx: &Context, val: bool) -> Status
Latest parsed value was a bool.
fn handle_string(&mut self, ctx: &Context, val: &str) -> Status
fn handle_string(&mut self, ctx: &Context, val: &str) -> Status
Latest parsed value was a string.
fn handle_start_map(&mut self, ctx: &Context) -> Status
fn handle_start_map(&mut self, ctx: &Context) -> Status
Latest parsed value was a left curly brace ({).
fn handle_end_map(&mut self, ctx: &Context) -> Status
fn handle_end_map(&mut self, ctx: &Context) -> Status
Latest parsed value was a right curly brace (}).
fn handle_map_key(&mut self, ctx: &Context, key: &str) -> Status
fn handle_map_key(&mut self, ctx: &Context, key: &str) -> Status
Latest parsed value was a key to a JSON object.
fn handle_start_array(&mut self, ctx: &Context) -> Status
fn handle_start_array(&mut self, ctx: &Context) -> Status
Latest parsed value was a left bracket ([).
fn handle_end_array(&mut self, ctx: &Context) -> Status
fn handle_end_array(&mut self, ctx: &Context) -> Status
Latest parsed value was a right bracket ([).