Trait HasId

Source
pub trait HasId {
    // Required methods
    fn id(&self) -> Option<&str>;
    fn get_local_map<'a, 'b>(
        maps: &'b LocalMaps<'a>,
    ) -> &'b Option<LocalMap<'a, Self>>;
    fn get_local_map_mut<'a, 'b>(
        maps: &'b mut LocalMaps<'a>,
    ) -> &'b mut Option<LocalMap<'a, Self>>;
}
Expand description

A generic ID getter function.

Required Methods§

Source

fn id(&self) -> Option<&str>

Get the ID of the node.

Source

fn get_local_map<'a, 'b>( maps: &'b LocalMaps<'a>, ) -> &'b Option<LocalMap<'a, Self>>

Extract the relevant LocalMap field from a LocalMaps.

Source

fn get_local_map_mut<'a, 'b>( maps: &'b mut LocalMaps<'a>, ) -> &'b mut Option<LocalMap<'a, Self>>

Extract the relevant LocalMap field from a LocalMaps.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§