[][src]Struct libmtp_rs::storage::files::File

pub struct File<'a> { /* fields omitted */ }

Abstraction of a file object, it implements Object, you may want to use this struct to create a tree representation of one storage.

Implementations

impl<'_> File<'_>[src]

pub fn storage_id(&self) -> u32[src]

Returns the id of the storage it belongs to.

pub fn parent_id(&self) -> Parent[src]

Returns the id of its parent.

pub fn size(&self) -> u64[src]

Returns the size of this file.

pub fn name(&self) -> &str[src]

Returns the name of this file.

pub fn ftype(&self) -> Filetype[src]

Returns the type of this file.

pub fn modification_date(&self) -> DateTime<Utc>[src]

Returns the latest modification date in UTC.

pub fn rename(&mut self, new_name: &str) -> Result<()>[src]

Rename this file in-place.

Trait Implementations

impl<'_> Debug for File<'_>[src]

impl<'_> Drop for File<'_>[src]

impl<'_> Object for File<'_>[src]

impl<'_, '_> Object for &'_ File<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for File<'a>

impl<'a> !Send for File<'a>

impl<'a> !Sync for File<'a>

impl<'a> Unpin for File<'a>

impl<'a> UnwindSafe for File<'a>

Blanket Implementations

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

impl<T> AsObjectId for T where
    T: Object
[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, 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.