pub struct TrashedName {
pub state: TrashState,
pub date_expires: i64,
pub original_name: String,
}Expand description
A decoded MediaStore .trashed-/.pending- filename.
Fields§
§state: TrashStateTrashed (30-day) vs pending (7-day).
date_expires: i64The dateExpires field, as stored: epoch seconds.
original_name: StringThe original display name (filename incl. extension), case preserved.
Implementations§
Source§impl TrashedName
impl TrashedName
Sourcepub fn expires_at(&self) -> Option<DateTime<Utc>>
pub fn expires_at(&self) -> Option<DateTime<Utc>>
The expiry instant encoded in the name (dateExpires), or None if the
value is outside the representable range.
Sourcepub fn inferred_deleted_at(&self) -> Option<DateTime<Utc>>
pub fn inferred_deleted_at(&self) -> Option<DateTime<Utc>>
The inferred deletion instant: dateExpires minus the state’s default
retention window. This holds only for the default-case (the user did not
override the duration), so it is an inference, not a recorded fact.
Trait Implementations§
Source§impl Clone for TrashedName
impl Clone for TrashedName
Source§fn clone(&self) -> TrashedName
fn clone(&self) -> TrashedName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TrashedName
impl Debug for TrashedName
impl Eq for TrashedName
Source§impl PartialEq for TrashedName
impl PartialEq for TrashedName
Source§fn eq(&self, other: &TrashedName) -> bool
fn eq(&self, other: &TrashedName) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TrashedName
Auto Trait Implementations§
impl Freeze for TrashedName
impl RefUnwindSafe for TrashedName
impl Send for TrashedName
impl Sync for TrashedName
impl Unpin for TrashedName
impl UnsafeUnpin for TrashedName
impl UnwindSafe for TrashedName
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