Enum tengwar::mode::ParseAction
source · pub enum ParseAction {
MatchedNone,
MatchedPart(usize),
MatchedToken {
token: Token,
len: usize,
},
Skip(usize),
Escape {
len_seq: usize,
n_skip: usize,
},
}
Expand description
The result of a call to TengwarMode::process
. This specifies the next
action that will be taken by a Tokenizer
.
Variants§
MatchedNone
Nothing could be done with the input.
MatchedPart(usize)
A portion of the input was processed successfully, but more is needed.
MatchedToken
Fields
A complete Token
has been processed.
Skip(usize)
A portion of the input has been determined to be irrelevant to the
processing. The contained number of char
s should be passed
through unchanged.
Escape
Fields
An escape sequence has been found. The next char
will be ignored,
and the one following will be passed through unchanged.
Implementations§
source§impl ParseAction
impl ParseAction
sourcepub const ESC_BACKSLASH: Self = _
pub const ESC_BACKSLASH: Self = _
The behavior of a simple backslash escape sequence.
pub const fn matched_opt(token: Option<Token>, len: usize) -> Self
Trait Implementations§
source§impl Clone for ParseAction
impl Clone for ParseAction
source§fn clone(&self) -> ParseAction
fn clone(&self) -> ParseAction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ParseAction
impl Send for ParseAction
impl Sync for ParseAction
impl Unpin for ParseAction
impl UnwindSafe for ParseAction
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