Struct AstNodeId
pub struct AstNodeId(/* private fields */);Expand description
A unique numerical identifier for a node in the AST. Identifiers start from 1.
To create a new AstNodeId, call Driver::make_node_id.
Implementations§
§impl AstNodeId
impl AstNodeId
pub fn null() -> Self
pub fn null() -> Self
Creates a null sentinel value for an AstNodeId.
It’s invalid for a node in the AST to have this value, except when temporarily breaking the invariant.
This function is used when moving a node out from the AST by temporarily replacing it with something else. That temporary replacement node has a null value, until it is replaced again or overwritten.
Trait Implementations§
impl Copy for AstNodeId
impl Eq for AstNodeId
impl StructuralPartialEq for AstNodeId
Auto Trait Implementations§
impl Freeze for AstNodeId
impl RefUnwindSafe for AstNodeId
impl Send for AstNodeId
impl Sync for AstNodeId
impl Unpin for AstNodeId
impl UnwindSafe for AstNodeId
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