pub struct Node { /* private fields */ }
Expand description
Represents a node in a composition graph.
Implementations§
Source§impl Node
impl Node
Sourcepub fn package(&self) -> Option<PackageId>
pub fn package(&self) -> Option<PackageId>
Gets the package id associated with the node.
Returns None
if the node is not directly associated with a package.
Sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
Gets the name of the node.
Node names are encoded in a names
custom section.
Returns None
if the node is unnamed.
Sourcepub fn import_name(&self) -> Option<&str>
pub fn import_name(&self) -> Option<&str>
Gets the import name of the node.
Returns Some
if the node is an import or None
if the node is not an import.
Sourcepub fn export_name(&self) -> Option<&str>
pub fn export_name(&self) -> Option<&str>
Gets the export name of the node.
Returns None
if the node is not exported.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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