pub struct PatternKind {
pub name: String,
pub id: u8,
pub pattern: Pattern,
pub guard: Option<UnitGuard>,
}Expand description
A token kind declared from a pattern over the stream: after the lex, the tokens each match covers fuse into one token of this kind.
Fields§
§name: StringThe name the \{name} atom uses.
id: u8The payload of the crate::token::TokenKind::Custom the fused
token carries.
pattern: PatternThe pattern whose matches become tokens.
guard: Option<UnitGuard>A check on the matched span, where the kind’s standard defines one: a span the check refuses is not fused.
Trait Implementations§
Source§impl Clone for PatternKind
impl Clone for PatternKind
Auto Trait Implementations§
impl Freeze for PatternKind
impl RefUnwindSafe for PatternKind
impl Send for PatternKind
impl Sync for PatternKind
impl Unpin for PatternKind
impl UnsafeUnpin for PatternKind
impl UnwindSafe for PatternKind
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