[−][src]Struct lumberjack::Features
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]
K: Into<String>,
V: Into<String>,
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]
S: AsRef<str>,
impl Clone for Features
[src]
fn clone(&self) -> 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]
K: Into<String>,
V: Into<String>,
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,