pub struct Streamer { /* private fields */ }Expand description
Reads parts of UTF-8 json input and emits paths e.g. reading of
{
"People": [
{"Height": 180, "Age": 33},
{"Height": 175, "Age": 24}
]
}should emit (index and path)
Start( 0, ParsedKind::Obj) // Streamer.path == ""
Start( 1, ParsedKind::Arr) // Streamer.path == "{\"People\"}"
Start( 3, ParsedKind::Obj) // Streamer.path == "{\"People\"}[0]"
Start( 4, ParsedKind::Num) // Streamer.path == "{\"People\"}[0]{\"Height\"}"
End( 5, ParsedKind::Num)
Start( 6, ParsedKind::Num) // Streamer.path == "{\"People\"}[0]{\"Age\"}"
End( 7, ParsedKind::Num)
End( 8, ParsedKind::Obj)
Start( 9, ParsedKind::Obj) // Streamer.path == "{\"People\"}[1]"
Start(10, ParsedKind::Num) // Streamer.path == "{\"People\"}[1]{\"Height\"}"
End( 11, ParsedKind::Num)
Start(12, ParsedKind::Num) // Streamer.path == "{\"People\"}[1]{\"Age\"}"
End( 13, ParsedKind::Num)
End( 14, ParsedKind::Obj)
End( 15, ParsedKind::Arr)
End( 16, ParsedKind::Obj)Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Streamer
impl RefUnwindSafe for Streamer
impl Send for Streamer
impl Sync for Streamer
impl Unpin for Streamer
impl UnwindSafe for Streamer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more