pub struct StreamingParser<'a> { /* private fields */ }Expand description
Streaming YAML parser that processes events on demand
Implementations§
Source§impl<'a> StreamingParser<'a>
impl<'a> StreamingParser<'a>
Sourcepub fn new(input: String, config: StreamingConfig) -> StreamingParser<'static>
pub fn new(input: String, config: StreamingConfig) -> StreamingParser<'static>
Create a new streaming parser with traditional scanner
Sourcepub fn new_zero_copy(input: &'a str, config: StreamingConfig) -> Self
pub fn new_zero_copy(input: &'a str, config: StreamingConfig) -> Self
Create a new streaming parser with zero-copy scanner
Sourcepub fn next_batch(&mut self) -> Result<Vec<Event>>
pub fn next_batch(&mut self) -> Result<Vec<Event>>
Get the next batch of events
Sourcepub fn get_stats(&mut self) -> Option<StreamingStats>
pub fn get_stats(&mut self) -> Option<StreamingStats>
Get current parsing statistics
Sourcepub fn has_more_events(&self) -> bool
pub fn has_more_events(&self) -> bool
Check if more events are available
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Get the current buffer size
Trait Implementations§
Source§impl<'a> Parser for StreamingParser<'a>
impl<'a> Parser for StreamingParser<'a>
Source§fn check_event(&self) -> bool
fn check_event(&self) -> bool
Check if there are more events available
Auto Trait Implementations§
impl<'a> Freeze for StreamingParser<'a>
impl<'a> RefUnwindSafe for StreamingParser<'a>
impl<'a> Send for StreamingParser<'a>
impl<'a> Sync for StreamingParser<'a>
impl<'a> Unpin for StreamingParser<'a>
impl<'a> UnwindSafe for StreamingParser<'a>
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