[][src]Struct binjs_io::entropy::dictionary::DictionaryFamily

pub struct DictionaryFamily<T> { /* fields omitted */ }

A family of dictionaries.

By convention:

Methods

impl<T> DictionaryFamily<T>[src]

pub fn exit(&mut self, name: &SharedString)[src]

Exit the current dictionary, returning to the parent dictionary.

Failure

Fails if name is not the name of the current dictionary. Used for assertion purposes.

pub fn len(&self) -> usize[src]

Return the sum of lengths of all dictionaries in this family.

impl DictionaryFamily<Instances>[src]

pub fn new() -> Self[src]

Create an empty DictionaryFamily.

Initially, this DictionaryFamily does not have a current dictionary. Before the first call to Self::current or Self::current_mut, clients MUST call either enter_existingor enter_or_create to enter a dictionary.

pub fn enter_or_create(&mut self, name: &SharedString, options: Options)[src]

Push a dictionary on top of the stack. Create the dictionary if no such dictionary exists.

pub fn current_mut(&mut self) -> &mut Dictionary<Instances>[src]

Access the current dictionary, mutably.

pub fn values_mut(&mut self) -> impl Iterator<Item = &mut Dictionary<Instances>>[src]

Iterate mutably through all dictionaries in this family.

pub fn insert_baseline(&mut self, dictionary: Dictionary<Instances>) -> bool[src]

Manually insert a dictionary in the family.

Returns true if there was already a baseline dictionary, false otherwise.

impl DictionaryFamily<SymbolInfo>[src]

pub fn enter_existing(&mut self, name: &SharedString) -> Result<(), ()>[src]

pub fn current(&self) -> &Dictionary<SymbolInfo>[src]

Access the current dictionary, immutably.

Trait Implementations

impl<T: Clone> Clone for DictionaryFamily<T>[src]

impl<'de, T> Deserialize<'de> for DictionaryFamily<T> where
    T: Deserialize<'de>, 
[src]

impl InstancesToProbabilities for DictionaryFamily<Instances>[src]

impl<T> Serialize for DictionaryFamily<T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for DictionaryFamily<T>

impl<T> !Send for DictionaryFamily<T>

impl<T> !Sync for DictionaryFamily<T>

impl<T> Unpin for DictionaryFamily<T>

impl<T> !UnwindSafe for DictionaryFamily<T>

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]