Struct littlefs2::fs::Attribute [−][src]
Custom user attribute that can be set on files and directories.
Consists of an numerical identifier between 0 and 255, and arbitrary
binary data up to size ATTRBYTES_MAX
.
Use Filesystem::attribute
,
Filesystem::set_attribute
, and
Filesystem::clear_attribute
.
Implementations
impl<S: Storage> Attribute<S>
[src]
pub fn new(id: u8) -> Self
[src]
pub fn id(&self) -> u8
[src]
pub fn data(&self) -> &[u8]
[src]
pub fn set_data(&mut self, data: &[u8]) -> &mut Self
[src]
Trait Implementations
impl<S: Clone + Storage> Clone for Attribute<S> where
S::ATTRBYTES_MAX: Clone,
[src]
S::ATTRBYTES_MAX: Clone,
impl<S: Debug + Storage> Debug for Attribute<S> where
S::ATTRBYTES_MAX: Debug,
[src]
S::ATTRBYTES_MAX: Debug,
impl<S: Eq + Storage> Eq for Attribute<S> where
S::ATTRBYTES_MAX: Eq,
[src]
S::ATTRBYTES_MAX: Eq,
impl<S: PartialEq + Storage> PartialEq<Attribute<S>> for Attribute<S> where
S::ATTRBYTES_MAX: PartialEq,
[src]
S::ATTRBYTES_MAX: PartialEq,
impl<S: Storage> StructuralEq for Attribute<S>
[src]
impl<S: Storage> StructuralPartialEq for Attribute<S>
[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for Attribute<S> where
<<S as Storage>::ATTRBYTES_MAX as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<<S as Storage>::ATTRBYTES_MAX as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<S> Send for Attribute<S>
impl<S> Sync for Attribute<S>
impl<S> Unpin for Attribute<S> where
<<S as Storage>::ATTRBYTES_MAX as ArrayLength<u8>>::ArrayType: Unpin,
<<S as Storage>::ATTRBYTES_MAX as ArrayLength<u8>>::ArrayType: Unpin,
impl<S> UnwindSafe for Attribute<S> where
<<S as Storage>::ATTRBYTES_MAX as ArrayLength<u8>>::ArrayType: UnwindSafe,
<<S as Storage>::ATTRBYTES_MAX as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,