pub struct SubEntry<'a> { /* private fields */ }
Expand description
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
sourceimpl<'a> SubEntry<'a>
impl<'a> SubEntry<'a>
sourcepub fn value(&'a self, key: &str) -> Option<&'a Node<&'a str>>
pub fn value(&'a self, key: &str) -> Option<&'a Node<&'a str>>
Retrieves the value of an item data value in the sub-entry.
sourcepub fn value_unique(&'a self, key: &str) -> Option<&'a str>
pub fn value_unique(&'a self, key: &str) -> Option<&'a str>
Gets the entry node with the given key if it exists.
This is shorthand for subentry.value("key").map(|f| f.unique().as_ref())
Trait Implementations
sourceimpl<'de> IntoDeserializer<'de, Error> for &'de SubEntry<'de>
impl<'de> IntoDeserializer<'de, Error> for &'de SubEntry<'de>
type Deserializer = SubEntryDeserializer<'de>
type Deserializer = SubEntryDeserializer<'de>
The type of the deserializer being converted into.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
impl<'a> Eq for SubEntry<'a>
impl<'a> StructuralEq for SubEntry<'a>
impl<'a> StructuralPartialEq for SubEntry<'a>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.