[−][src]Struct streamson_lib::streamer::Streamer
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) // Streamer.path == ""
Start( 1) // Streamer.path == "{\"People\"}"
Start( 3) // Streamer.path == "{\"People\"}[0]"
Start( 4) // Streamer.path == "{\"People\"}[0]{\"Height\"}"
End( 5)
Start( 6) // Streamer.path == "{\"People\"}[0]{\"Age\"}"
End( 7)
End( 8)
Start( 9) // Streamer.path == "{\"People\"}[1]"
Start(10) // Streamer.path == "{\"People\"}[1]{\"Height\"}"
End( 11)
Start(12) // Streamer.path == "{\"People\"}[1]{\"Age\"}"
End( 13)
End( 14)
End( 15)
End( 16)
Implementations
impl Streamer
[src]
pub fn new() -> Self
[src]
Creates a new instance of streamer
pub fn current_path(&mut self) -> &mut Path
[src]
Returns current path
pub fn feed(&mut self, input: &[u8])
[src]
Feed streamer with data
pub fn read(&mut self) -> Result<Output, General>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Streamer
impl Send for Streamer
impl Sync for Streamer
impl Unpin for Streamer
impl UnwindSafe for Streamer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,