pub struct XattrsRef<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> XattrsRef<'a>
impl<'a> XattrsRef<'a>
Sourcepub fn parse(data: &'a [u8]) -> Result<XattrsRef<'a>>
pub fn parse(data: &'a [u8]) -> Result<XattrsRef<'a>>
Creates a view of a slice that holds exactly one serialized a(ayay).
§Errors
Error::Gvariant if the framing of the array is not normal form.
Sourcepub fn iter(
&self,
) -> impl Iterator<Item = Result<(&'a [u8], &'a [u8])>> + use<'a>
pub fn iter( &self, ) -> impl Iterator<Item = Result<(&'a [u8], &'a [u8])>> + use<'a>
Returns an iterator over the (name, value) entries.
The iterator checks each entry when it visits it. The error items are
the errors of to_owned.
Sourcepub fn to_owned(&self) -> Result<Xattrs>
pub fn to_owned(&self) -> Result<Xattrs>
Collects the entries into an owned, canonical Xattrs.
§Errors
Error::Gvariantif an entry is not a normal-form(ayay)pair.Error::InvalidXattrsif a name is not in the stored form, or with the reasonxattr names are not strictly sorted.Xattrs::from_gvariantlists the reasons.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for XattrsRef<'a>
impl<'a> Freeze for XattrsRef<'a>
impl<'a> Move for XattrsRef<'a>
impl<'a> RefUnwindSafe for XattrsRef<'a>
impl<'a> Send for XattrsRef<'a>
impl<'a> Sync for XattrsRef<'a>
impl<'a> Unpin for XattrsRef<'a>
impl<'a> UnsafeUnpin for XattrsRef<'a>
impl<'a> UnwindSafe for XattrsRef<'a>where
&'a [u8]: UnwindSafe,
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