[][src]Struct lumberjack::Features

pub struct Features { /* fields omitted */ }

Features.

These can be e.g. morphological features on Terminal or syntactic-semantic labels on NonTerminal nodes.

Methods

impl Features[src]

pub fn new() -> Self[src]

Construct empty Features.

pub fn inner(&self) -> &BTreeMap<String, Option<String>>[src]

Get a slice of the backing BTreeMap.

pub fn inner_mut(&mut self) -> &mut BTreeMap<String, Option<String>>[src]

Get the backing BTreeMap mutably.

pub fn insert<K, V>(&mut self, key: K, val: Option<V>) -> Option<String> where
    K: Into<String>,
    V: Into<String>, 
[src]

Insert key with val.

If key was present, the replaced value is returned, otherwise None.

pub fn get_val(&self, key: &str) -> Option<&str>[src]

Get the value associated with key.

pub fn remove(&mut self, key: &str) -> Option<String>[src]

Remove the tuple associated with key.

Returns None if key was not found.

Trait Implementations

impl PartialEq<Features> for Features[src]

impl<S> From<S> for Features where
    S: AsRef<str>, 
[src]

impl Clone for Features[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Features[src]

impl Eq for Features[src]

impl ToString for Features[src]

impl Debug for Features[src]

impl<K, V> FromIterator<(K, Option<V>)> for Features where
    K: Into<String>,
    V: Into<String>, 
[src]

Auto Trait Implementations

impl Send for Features

impl Sync for Features

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]