[−][src]Struct listinfo::SubEntry
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>>ⓘ
[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.
fn into_deserializer(self) -> Self::Deserializer
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,