Struct littlefs2::fs::Attribute[][src]

pub struct Attribute<S: Storage> { /* fields omitted */ }

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]

impl<S: Debug + Storage> Debug for Attribute<S> where
    S::ATTRBYTES_MAX: Debug
[src]

impl<S: Eq + Storage> Eq for Attribute<S> where
    S::ATTRBYTES_MAX: Eq
[src]

impl<S: PartialEq + Storage> PartialEq<Attribute<S>> for Attribute<S> where
    S::ATTRBYTES_MAX: PartialEq
[src]

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

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

impl<S> UnwindSafe for Attribute<S> where
    <<S as Storage>::ATTRBYTES_MAX as ArrayLength<u8>>::ArrayType: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.