[][src]Trait lhlist::StrLabels

pub trait StrLabels {
    fn static_labels() -> Vec<&'static str>;

    fn labels(&self) -> Vec<&'static str> { ... }
}

Generate a Vec containing the names of the labels in a labeled cons-list.

Example

use lhlist::StrLabels;
new_label![MyLabel1];
new_label![MyLabel2];
new_label![MyLabel3];

let list = lhlist![MyLabel1 = (), MyLabel2 = (), MyLabel3 = ()];
assert_eq!(list.labels(), vec!["MyLabel1", "MyLabel2", "MyLabel3"]);

Required methods

fn static_labels() -> Vec<&'static str>

Generates the label name Vec

Loading content...

Provided methods

fn labels(&self) -> Vec<&'static str>

Generates the label name Vec using a value

Loading content...

Implementors

impl StrLabels for Nil[src]

fn labels(&self) -> Vec<&'static str>[src]

impl<Lbl: Sized, Tail> StrLabels for Cons<Lbl, Tail> where
    Self: Len + BuildStrLabels, 
[src]

fn labels(&self) -> Vec<&'static str>[src]

Loading content...