pub struct Parser {
pub(crate) point: u32,
pub(crate) state: State,
}
Expand description
A parser for Utf8 Characters
Repeatedly call advance
with bytes to emit Utf8 characters
Fields§
§point: u32
§state: State
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn advance<R>(&mut self, receiver: &mut R, byte: u8)where
R: Receiver,
pub fn advance<R>(&mut self, receiver: &mut R, byte: u8)where
R: Receiver,
Advance the parser
The provider receiver will be called whenever a codepoint is completed or an invalid sequence is detected.
pub(crate) fn perform_action<R>(
&mut self,
receiver: &mut R,
byte: u8,
action: Action,
)where
R: Receiver,
Trait Implementations§
impl Eq for Parser
impl StructuralPartialEq for Parser
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