pub struct Parser { /* private fields */ }Expand description
VT/ANSI parser state.
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn feed(&mut self, bytes: &[u8]) -> Vec<Action>
pub fn feed(&mut self, bytes: &[u8]) -> Vec<Action>
Feed a chunk of bytes and return parsed actions.
Sourcepub fn feed_into(&mut self, bytes: &[u8], out: &mut Vec<Action>)
pub fn feed_into(&mut self, bytes: &[u8], out: &mut Vec<Action>)
Feed a chunk of bytes, appending parsed actions to out.
This avoids allocating a new Vec per call — callers on hot paths can
reuse the same output buffer across frames by calling out.clear()
before each invocation while retaining the underlying capacity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
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