[][src]Trait lhlist::Label

pub trait Label {
    type AssocType;
    type Uid: Unsigned;

    const NAME: &'static str;
    fn name() -> &'static str { ... }
fn id() -> usize { ... } }

A trait with information about a label.

Typically, labels are simply unit-like structs used to identify elements in a list. This trait contains the label's name, an associated type, and an internal identifier.

It is encouraged that this trait be implemented using the new_label macro or the #[label] attribute, which ensures that the identifier Uid is unique. See the documentation for new_label for examples.

Associated Types

type AssocType

Associated type of this label

type Uid: Unsigned

Internal unique label identifier

Loading content...

Associated Constants

const NAME: &'static str

Name of this label (for display /output)

Loading content...

Provided methods

fn name() -> &'static str

Returns the label's name (by default, variable name)

fn id() -> usize

Returns the label's unique identifier

Loading content...

Implementations on Foreign Types

impl<L> Label for PhantomData<L> where
    L: Label
[src]

type AssocType = L::AssocType

type Uid = L::Uid

fn name() -> &'static str[src]

fn id() -> usize[src]

Loading content...

Implementors

impl<L> Label for LabeledValue<L> where
    L: Label
[src]

type AssocType = L::AssocType

type Uid = L::Uid

fn name() -> &'static str[src]

fn id() -> usize[src]

Loading content...