pub enum DesktopIniAction {
SetField {
file: PathBuf,
group: String,
field: String,
locale: Option<String>,
value: String,
},
RemoveField {
file: PathBuf,
group: String,
field: String,
locale: Option<String>,
},
RemoveAll {
file: PathBuf,
group: String,
field: String,
},
RenameField {
file: PathBuf,
group: String,
from: String,
to: String,
},
}Expand description
Edits to a freedesktop .desktop entry file.
Desktop entry files are sectioned ini-style files with [Group]
headers and locale-tagged keys (e.g. Name[de]=...). Each variant
identifies one group and one entry within it.
Variants§
SetField
Set a key. If locale is None, sets the unlocalised entry;
otherwise sets the entry tagged with locale (e.g. de).
Fields
RemoveField
Remove a key. If locale is None, removes the unlocalised entry
only; if a locale is given, removes only that locale variant. To
drop every locale variant of a key, use RemoveAll.
Fields
RemoveAll
Remove a key together with every locale variant.
Fields
RenameField
Rename a key, preserving its value (and every locale variant).
Trait Implementations§
Source§impl Clone for DesktopIniAction
impl Clone for DesktopIniAction
Source§fn clone(&self) -> DesktopIniAction
fn clone(&self) -> DesktopIniAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DesktopIniAction
impl Debug for DesktopIniAction
Source§impl<'de> Deserialize<'de> for DesktopIniAction
impl<'de> Deserialize<'de> for DesktopIniAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DesktopIniAction
Source§impl PartialEq for DesktopIniAction
impl PartialEq for DesktopIniAction
Source§fn eq(&self, other: &DesktopIniAction) -> bool
fn eq(&self, other: &DesktopIniAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DesktopIniAction
impl Serialize for DesktopIniAction
impl StructuralPartialEq for DesktopIniAction
Auto Trait Implementations§
impl Freeze for DesktopIniAction
impl RefUnwindSafe for DesktopIniAction
impl Send for DesktopIniAction
impl Sync for DesktopIniAction
impl Unpin for DesktopIniAction
impl UnsafeUnpin for DesktopIniAction
impl UnwindSafe for DesktopIniAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.