pub struct Group {
pub header: String,
pub content: GroupContent,
}Expand description
A group of entries.
This represents a section in a freedesktop file.
Fields§
§header: StringThe section name.
content: GroupContentThe content of the section.
Implementations§
Source§impl Group
impl Group
Sourcepub fn find_with_locale(
&self,
key: &str,
options: &LocaleOptions<'_>,
) -> Option<&ContentEntry>
pub fn find_with_locale( &self, key: &str, options: &LocaleOptions<'_>, ) -> Option<&ContentEntry>
Find the first entry for this key and locale, or None if no entry with this key was found.
Sourcepub fn find_with_locale_mut(
&mut self,
key: &str,
options: &LocaleOptions<'_>,
) -> Option<&mut ContentEntry>
pub fn find_with_locale_mut( &mut self, key: &str, options: &LocaleOptions<'_>, ) -> Option<&mut ContentEntry>
Find the first entry for this key and locale and returns it as a mutable reference, or None if no entry with this key was found.
Trait Implementations§
Source§impl EntrySet<ContentEntry> for Group
impl EntrySet<ContentEntry> for Group
Source§fn without_comments(&self) -> Vec<&ContentEntry>
fn without_comments(&self) -> Vec<&ContentEntry>
Returns a vector of the entries that are not comments or blanks.
Source§fn only_comments(&self) -> Vec<&CommentEntry>
fn only_comments(&self) -> Vec<&CommentEntry>
Returs a vector of the entries that are comments or blanks (no key-values entries).
Source§fn find(&self, key: &str) -> Option<&ContentEntry>
fn find(&self, key: &str) -> Option<&ContentEntry>
Find the first entry for this key, or
None if no entry with this key was found.Source§fn find_mut(&mut self, key: &str) -> Option<&mut ContentEntry>
fn find_mut(&mut self, key: &str) -> Option<&mut ContentEntry>
Find the first entry for this key and returns it as a mutable reference, or
None if no entry with this key was found.Source§impl EntrySet<Group> for DesktopFile
impl EntrySet<Group> for DesktopFile
Source§fn without_comments(&self) -> Vec<&Group>
fn without_comments(&self) -> Vec<&Group>
Returns a vector of the entries that are not comments or blanks.
Source§fn only_comments(&self) -> Vec<&CommentEntry>
fn only_comments(&self) -> Vec<&CommentEntry>
Returs a vector of the entries that are comments or blanks (no key-values entries).
Source§fn find(&self, header: &str) -> Option<&Group>
fn find(&self, header: &str) -> Option<&Group>
Find the first entry for this key, or
None if no entry with this key was found.Source§fn find_mut(&mut self, header: &str) -> Option<&mut Group>
fn find_mut(&mut self, header: &str) -> Option<&mut Group>
Find the first entry for this key and returns it as a mutable reference, or
None if no entry with this key was found.impl Eq for Group
Source§impl From<Group> for TopLevelEntry
impl From<Group> for TopLevelEntry
impl StructuralPartialEq for Group
Auto Trait Implementations§
impl Freeze for Group
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnsafeUnpin for Group
impl UnwindSafe for Group
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