pub enum Pat {
Any,
Bind(&'static str),
Kind(NodeKind, &'static [Pat]),
LitBool(bool),
LitInt(i64),
}Variants§
Any
任意节点。
Bind(&'static str)
绑定当前节点 id 到名字。
Kind(NodeKind, &'static [Pat])
节点 kind 匹配且 children 与 pats 一一同数量、按序匹配。
LitBool(bool)
boolean 字面量。
LitInt(i64)
整数字面量(Int/Long)值匹配。
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pat
impl RefUnwindSafe for Pat
impl Send for Pat
impl Sync for Pat
impl Unpin for Pat
impl UnsafeUnpin for Pat
impl UnwindSafe for Pat
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