pub struct GenericEntry {
pub path: PathBuf,
pub groups: Groups,
}Expand description
Parse files based on the desktop entry spec. Any duplicate groups or keys will be overridden by the last parsed value and any entries without a group will be ignored.
Fields§
§path: PathBuf§groups: GroupsImplementations§
Source§impl GenericEntry
impl GenericEntry
pub fn from_str( path: impl Into<PathBuf>, input: &str, ) -> Result<GenericEntry, DecodeError>
Sourcepub fn from_path(path: impl Into<PathBuf>) -> Result<GenericEntry, DecodeError>
pub fn from_path(path: impl Into<PathBuf>) -> Result<GenericEntry, DecodeError>
Return an owned GenericEntry
pub fn group(&self, key: &str) -> Option<&Group>
Trait Implementations§
Source§impl Clone for GenericEntry
impl Clone for GenericEntry
Source§fn clone(&self) -> GenericEntry
fn clone(&self) -> GenericEntry
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 Debug for GenericEntry
impl Debug for GenericEntry
Auto Trait Implementations§
impl Freeze for GenericEntry
impl RefUnwindSafe for GenericEntry
impl Send for GenericEntry
impl Sync for GenericEntry
impl Unpin for GenericEntry
impl UnwindSafe for GenericEntry
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