[][src]Struct listinfo::EntryFragment

pub struct EntryFragment<'a> { /* fields omitted */ }

Represents a single ListInfo entry fragment.

An entry fragment is a top level element in a ListInfo DAT document.

The following is an example of a clrmamepro fragment with a name element.

clrmamepro (
  name "DAT file."
)

Implementations

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

pub fn entry(&'a self, key: &str) -> Option<&'a Node<EntryData<'a>>>[src]

Gets the entry node with the given key if it exists.

pub fn entry_unique(&'a self, key: &str) -> Option<&'a EntryData<'_>>[src]

Gets the entry node with the given key if it exists.

This is shorthand for fragment.entry("key").map(|f| f.unique())

pub fn entry_iter(
    &'a self,
    key: &str
) -> Option<impl Iterator<Item = &'a EntryData<'_>>>
[src]

Gets the values with the given key if it exists.

This is shorthand for fragment.entry("key").map(|f| f.iter())

pub fn iter(&'a self) -> EntryIter<'a, &'a str, Node<EntryData<'a>>>

Notable traits for EntryIter<'a, &'a K, V>

impl<'a, K, V> Iterator for EntryIter<'a, &'a K, V> where
    K: ?Sized
type Item = (&'a K, &'a V);
[src]

Gets an key value iterator over the entries of this fragment.

Trait Implementations

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

impl<'de> IntoDeserializer<'de, Error> for &'de EntryFragment<'de>[src]

type Deserializer = FragmentDeserializer<'de>

The type of the deserializer being converted into.

Auto Trait Implementations

impl<'a> RefUnwindSafe for EntryFragment<'a>

impl<'a> Send for EntryFragment<'a>

impl<'a> Sync for EntryFragment<'a>

impl<'a> Unpin for EntryFragment<'a>

impl<'a> UnwindSafe for EntryFragment<'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.