[][src]Enum listinfo::EntryNode

pub enum EntryNode<'a> {
    Unique(EntryData<'a>),
    Many(Vec<EntryData<'a>>),
}

Represents one node in an ListInfo entry.

Note: The split between Unique and Many is mostly for performance reasons to avoid unnescessary allocations.

Instead of matching the EntryNode, useEntryFragment::get_unique() and EntryFragment::get_iter() to access EntryData per expectations.

Variants

Unique(EntryData<'a>)

A uniquely keyed node (only one of such key exists in the entry)

Many(Vec<EntryData<'a>>)

Multiple nodes with the same key.

Implementations

impl<'a> EntryNode<'a>[src]

pub fn iter(&'a self) -> impl Iterator<Item = &EntryData>[src]

Gets the values with the given key.

If the provided key is a unique value, returns an iterator that yields that single value.

pub fn unique(&'a self) -> &EntryData[src]

Gets a single value with the given key.

If the provided key is not unique, retrieves the first value of the many-set with the given key.

Trait Implementations

impl<'a> Debug for EntryNode<'a>[src]

impl<'a> Eq for EntryNode<'a>[src]

impl<'a> PartialEq<EntryNode<'a>> for EntryNode<'a>[src]

impl<'a> StructuralEq for EntryNode<'a>[src]

impl<'a> StructuralPartialEq for EntryNode<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for EntryNode<'a>

impl<'a> Send for EntryNode<'a>

impl<'a> Sync for EntryNode<'a>

impl<'a> Unpin for EntryNode<'a>

impl<'a> UnwindSafe for EntryNode<'a>

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, 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.