Skip to main content

NodeExt

Trait NodeExt 

Source
pub trait NodeExt {
    // Required method
    fn kind(&self) -> Result<NodeKind<'_>>;
}
Expand description

Classification of a Node by which of its mutually exclusive implementation fields is set.

Required Methods§

Source

fn kind(&self) -> Result<NodeKind<'_>>

Determine the node’s NodeKind.

A node must set exactly one of path, operators, operator, ros2, or module; this returns an error if none or more than one is set. A node carrying an unresolved hub: reference is also rejected — hub: is desugared into a concrete node earlier in the build, so reaching kind with one still present means resolution was skipped.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§