Trait substrate::io::HasNameTree

source ·
pub trait HasNameTree {
    // Required method
    fn names(&self) -> Option<Vec<NameTree>>;

    // Provided method
    fn flat_names(&self, root: Option<NameFragment>) -> Vec<NameBuf> { ... }
}
Expand description

An object with named flattened components.

Required Methods§

source

fn names(&self) -> Option<Vec<NameTree>>

Return a tree specifying how nodes contained within this type should be named.

Important: empty types (i.e. those with a flattened length of 0) must return None. All non-empty types must return Some.

Provided Methods§

source

fn flat_names(&self, root: Option<NameFragment>) -> Vec<NameBuf>

Returns a flattened list of node names.

Implementations on Foreign Types§

source§

impl HasNameTree for ()

Implementors§