[][src]Struct ttk91::symbol_table::SymbolInfo

pub struct SymbolInfo { /* fields omitted */ }

The entry in SymbolTable which contains the information relating to a single symbol.

Provides a typed map API that uses types implementing Property as the keys. Each of these key types has an associated Value type, an so the keys can have values of differing types.

Implementations

impl SymbolInfo[src]

pub fn set<F: Property + 'static>(
    &mut self,
    value: F::Value
) -> Option<F::Value>
[src]

Sets the value of the field specified by the type F. If the field is already specified, replaces the value and returns the original.

pub fn get<F: Property + 'static>(&self) -> Cow<F::Value>[src]

Gets the value of the field specified by the type F. If the field has an value, returns an reference to it. Otherwise returns the Default of that value.

pub fn get_mut<F>(&mut self) -> &mut F::Value where
    F: Property + 'static, 
[src]

Gets a mutable reference to the field specified by the type F. If the field is not present for this symbol, inserts the Default value of the field into the SymbolTable.

Trait Implementations

impl Clone for SymbolInfo[src]

impl Debug for SymbolInfo[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.