[][src]Struct listinfo::SubEntry

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

The contents of a sub-entry (such as rom or disk) that is a child of a ListInfo entry.

Sub-entries can not contain their own sub-entries and can only contain scalars or lists of scalars. For example, the rom entries in the following fragment are sub-entries.

game (
 rom (name "Rom 1")
 rom (name "Rom 2")
)

Implementations

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

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

Retrieves the value of an item data value in the sub-entry.

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

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

This is shorthand for subentry.value("key").map(|f| f.unique().as_ref())

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

Gets the values with the given key if it exists.

This is shorthand for fragment.value("key").map(|f| f.iter().map(|&s| s))

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

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 a key value iterator over the values of this fragment.

Trait Implementations

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

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

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

type Deserializer = SubEntryDeserializer<'de>

The type of the deserializer being converted into.

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

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

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for SubEntry<'a>

impl<'a> Send for SubEntry<'a>

impl<'a> Sync for SubEntry<'a>

impl<'a> Unpin for SubEntry<'a>

impl<'a> UnwindSafe for SubEntry<'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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.