Skip to main content

TrashItem

Struct TrashItem 

Source
pub struct TrashItem {
    pub id: String,
    pub href: String,
    pub filename: String,
    pub original_location: String,
    pub deletion_time: Option<u64>,
    pub last_modified: Option<String>,
    pub is_collection: bool,
}
Expand description

A deleted item in a user’s Nextcloud trashbin.

Returned by TrashClient::list. Holds the metadata reported by Nextcloud’s WebDAV trashbin endpoint, including its identifier, original filename, original location, deletion timestamp, and WebDAV properties.

Fields§

§id: String

Identifier of the trash item (the path segment in the trashbin URL).

§href: String

WebDAV resource href reported by the server.

§filename: String

Original file or directory name before deletion (trashbin-filename).

§original_location: String

Path where the item resided before deletion (trashbin-original-location).

§deletion_time: Option<u64>

Unix timestamp (in seconds) when the item was moved to the trash (trashbin-deletion-time).

§last_modified: Option<String>

Last modified time as reported by the server (d:getlastmodified).

§is_collection: bool

Whether the resource is a collection/folder (<d:collection/>).

Implementations§

Source§

impl TrashItem

Source

pub fn id(&self) -> &str

Identifier of the trash item.

Source

pub fn href(&self) -> &str

WebDAV href of the item.

Source

pub fn filename(&self) -> &str

Original filename before deletion.

Source

pub fn original_filename(&self) -> &str

Original filename before deletion (alias for filename).

Source

pub fn original_location(&self) -> &str

Original path where the item resided before deletion.

Source

pub fn deletion_time(&self) -> Option<u64>

Unix timestamp when the item was deleted, if available.

Source

pub fn last_modified(&self) -> Option<&str>

Last modified HTTP date string, if available.

Source

pub fn is_collection(&self) -> bool

Whether the item is a collection (folder).

Trait Implementations§

Source§

impl Clone for TrashItem

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TrashItem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for TrashItem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TrashItem

Source§

impl PartialEq for TrashItem

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TrashItem

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.