Enum ini::SectionEntry
source · pub enum SectionEntry<'a> {
Vacant(SectionVacantEntry<'a>),
Occupied(SectionOccupiedEntry<'a>),
}
Expand description
A view into an Ini
, which may either be vacant or occupied.
Variants§
Vacant(SectionVacantEntry<'a>)
Occupied(SectionOccupiedEntry<'a>)
Implementations§
source§impl<'a> SectionEntry<'a>
impl<'a> SectionEntry<'a>
sourcepub fn or_insert(self, properties: Properties) -> &'a mut Properties
pub fn or_insert(self, properties: Properties) -> &'a mut Properties
Ensures a value is in the entry by inserting the default if empty, and returns a mutable reference to the value in the entry.
sourcepub fn or_insert_with<F: FnOnce() -> Properties>(
self,
default: F,
) -> &'a mut Properties
pub fn or_insert_with<F: FnOnce() -> Properties>( self, default: F, ) -> &'a mut Properties
Ensures a value is in the entry by inserting the result of the default function if empty, and returns a mutable reference to the value in the entry.
Trait Implementations§
source§impl<'a> From<Entry<'a, Option<String>, Properties>> for SectionEntry<'a>
impl<'a> From<Entry<'a, Option<String>, Properties>> for SectionEntry<'a>
source§fn from(e: Entry<'a, SectionKey, Properties>) -> SectionEntry<'a>
fn from(e: Entry<'a, SectionKey, Properties>) -> SectionEntry<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for SectionEntry<'a>
impl<'a> RefUnwindSafe for SectionEntry<'a>
impl<'a> Send for SectionEntry<'a>
impl<'a> Sync for SectionEntry<'a>
impl<'a> Unpin for SectionEntry<'a>
impl<'a> !UnwindSafe for SectionEntry<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more