pub struct DesktopEntry<'a> { /* private fields */ }Expand description
A Desktop Entry File
The structure that contains a .desktop or service file. This structure is divided into
groups. The groups can be accessed by calling the [iter], [iter_mut] or [into_iter]
functions. A Desktop Entry File can be parsed from a &str by calling the
DesktopEntry::try_from function.
§Examples
§Parsing a Desktop Entry
use deentry::DesktopEntry;
let desktop_entry = r#"
[Desktop Entry]
Name=CoolApplication
Exec=/path/to/app
"#;
let desktop_entry = DesktopEntry::try_from(desktop_entry)?;Implementations§
Source§impl<'a> DesktopEntry<'a>
impl<'a> DesktopEntry<'a>
Sourcepub fn groups(&self) -> &[DesktopEntryGroup<'a>]
pub fn groups(&self) -> &[DesktopEntryGroup<'a>]
Get a slice with all the groups in the desktop entry file
Sourcepub fn groups_mut(&mut self) -> &mut [DesktopEntryGroup<'a>]
pub fn groups_mut(&mut self) -> &mut [DesktopEntryGroup<'a>]
Get a mutable slice with all the groups in the desktop entry file
Trait Implementations§
Source§impl<'a> Clone for DesktopEntry<'a>
impl<'a> Clone for DesktopEntry<'a>
Source§fn clone(&self) -> DesktopEntry<'a>
fn clone(&self) -> DesktopEntry<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for DesktopEntry<'a>
impl<'a> Debug for DesktopEntry<'a>
Auto Trait Implementations§
impl<'a> Freeze for DesktopEntry<'a>
impl<'a> RefUnwindSafe for DesktopEntry<'a>
impl<'a> Send for DesktopEntry<'a>
impl<'a> Sync for DesktopEntry<'a>
impl<'a> Unpin for DesktopEntry<'a>
impl<'a> UnwindSafe for DesktopEntry<'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