pub struct Parser<C = DefaultCharAccumulator> {
pub(crate) state: State,
pub(crate) intermediates: [u8; 2],
pub(crate) intermediate_idx: usize,
pub(crate) params: Params,
pub(crate) param: u16,
pub(crate) osc_raw: Vec<u8>,
pub(crate) osc_params: [(usize, usize); 16],
pub(crate) osc_num_params: usize,
pub(crate) ignoring: bool,
pub(crate) utf8_parser: C,
}
Expand description
Parser for raw VTE protocol which delegates actions to a Perform
Fields§
§state: State
§intermediates: [u8; 2]
§intermediate_idx: usize
§params: Params
§param: u16
§osc_raw: Vec<u8>
§osc_params: [(usize, usize); 16]
§osc_num_params: usize
§ignoring: bool
§utf8_parser: C
Implementations§
Source§impl<C> Parser<C>where
C: CharAccumulator,
impl<C> Parser<C>where
C: CharAccumulator,
pub(crate) fn params(&self) -> &Params
pub(crate) fn intermediates(&self) -> &[u8]
Sourcepub fn advance<P: Perform>(&mut self, performer: &mut P, byte: u8)
pub fn advance<P: Perform>(&mut self, performer: &mut P, byte: u8)
Advance the parser state
Requires a Perform
in case byte
triggers an action
pub(crate) fn process_utf8<P>(&mut self, performer: &mut P, byte: u8)where
P: Perform,
pub(crate) fn perform_state_change<P>(
&mut self,
performer: &mut P,
state: State,
action: Action,
byte: u8,
)where
P: Perform,
Sourcepub(crate) fn osc_dispatch<P: Perform>(&self, performer: &mut P, byte: u8)
pub(crate) fn osc_dispatch<P: Perform>(&self, performer: &mut P, byte: u8)
Separate method for osc_dispatch
that borrows self as read-only
The aliasing is needed here for multiple slices into self.osc_raw
pub(crate) fn perform_action<P: Perform>( &mut self, performer: &mut P, action: Action, byte: u8, )
Trait Implementations§
impl<C: Eq> Eq for Parser<C>
impl<C> StructuralPartialEq for Parser<C>
Auto Trait Implementations§
impl<C> Freeze for Parser<C>where
C: Freeze,
impl<C> RefUnwindSafe for Parser<C>where
C: RefUnwindSafe,
impl<C> Send for Parser<C>where
C: Send,
impl<C> Sync for Parser<C>where
C: Sync,
impl<C> Unpin for Parser<C>where
C: Unpin,
impl<C> UnwindSafe for Parser<C>where
C: UnwindSafe,
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