pub struct Section(/* private fields */);Expand description
A section of a FreeDesktop entry file.
Implementations§
Source§impl Section
impl Section
Sourcepub fn attr(&self, key: impl AsRef<str>) -> &[String]
pub fn attr(&self, key: impl AsRef<str>) -> &[String]
Get the values of the attribute key.
If the attribute is defined multiple times, all of them will be in the list, if the attribute is missing the list will be empty.
Sourcepub fn attr_with_param(
&self,
key: impl AsRef<str>,
param: impl AsRef<str>,
) -> &[String]
pub fn attr_with_param( &self, key: impl AsRef<str>, param: impl AsRef<str>, ) -> &[String]
Get the value of the attribute name and param value param_val.
If the attribute is defined multiple times, all of them will be in the list, if the attribute is missing the list will be empty.
Sourcepub fn has_attr(&self, key: impl AsRef<str>) -> bool
pub fn has_attr(&self, key: impl AsRef<str>) -> bool
Check if this section has an attribute with name.
Trait Implementations§
Source§impl<'a> IntoIterator for &'a Section
impl<'a> IntoIterator for &'a Section
impl Eq for Section
impl StructuralPartialEq for Section
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnwindSafe for Section
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,
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.