enum NodeDef<'a> {
ModuleDialect(&'a ModuleDialect),
ModuleDebugInfo(&'a ModuleDebugInfo),
GlobalVar(&'a GlobalVarDecl),
Func(&'a FuncDecl),
}
Expand description
Definition of a Node
(i.e. a reference pointing into a Module
).
Note: Node::AllCxInterned
does not have its own NodeDef
variant,
as it must be specially handled instead.
Variants§
ModuleDialect(&'a ModuleDialect)
ModuleDebugInfo(&'a ModuleDebugInfo)
GlobalVar(&'a GlobalVarDecl)
Func(&'a FuncDecl)
Trait Implementations§
source§impl<'a> From<&'a GlobalVarDecl> for NodeDef<'a>
impl<'a> From<&'a GlobalVarDecl> for NodeDef<'a>
source§fn from(original: &'a GlobalVarDecl) -> NodeDef<'a>
fn from(original: &'a GlobalVarDecl) -> NodeDef<'a>
Converts to this type from the input type.
source§impl<'a> From<&'a ModuleDebugInfo> for NodeDef<'a>
impl<'a> From<&'a ModuleDebugInfo> for NodeDef<'a>
source§fn from(original: &'a ModuleDebugInfo) -> NodeDef<'a>
fn from(original: &'a ModuleDebugInfo) -> NodeDef<'a>
Converts to this type from the input type.
source§impl<'a> From<&'a ModuleDialect> for NodeDef<'a>
impl<'a> From<&'a ModuleDialect> for NodeDef<'a>
source§fn from(original: &'a ModuleDialect) -> NodeDef<'a>
fn from(original: &'a ModuleDialect) -> NodeDef<'a>
Converts to this type from the input type.
source§impl Print for NodeDef<'_>
impl Print for NodeDef<'_>
type Output = AttrsAndDef
fn print(&self, printer: &Printer<'_>) -> AttrsAndDef
impl<'a> Copy for NodeDef<'a>
Auto Trait Implementations§
impl<'a> Freeze for NodeDef<'a>
impl<'a> RefUnwindSafe for NodeDef<'a>
impl<'a> Send for NodeDef<'a>
impl<'a> Sync for NodeDef<'a>
impl<'a> Unpin for NodeDef<'a>
impl<'a> UnwindSafe for NodeDef<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more