pub struct UnixMtimeSeconds { /* private fields */ }Expand description
Whole Unix epoch seconds used by Thumb::MTime.
Implementations§
Source§impl UnixMtimeSeconds
impl UnixMtimeSeconds
Sourcepub const fn new(seconds: u64) -> Self
pub const fn new(seconds: u64) -> Self
Creates a timestamp from non-negative whole Unix epoch seconds.
Sourcepub const fn try_from_i64(seconds: i64) -> Result<Self>
pub const fn try_from_i64(seconds: i64) -> Result<Self>
Creates a timestamp from signed whole Unix epoch seconds.
§Errors
Returns an error when seconds is negative.
Sourcepub fn from_system_time(time: SystemTime) -> Result<Self>
pub fn from_system_time(time: SystemTime) -> Result<Self>
Converts a SystemTime to whole non-negative Unix epoch seconds.
§Errors
Returns an error when time is before the Unix epoch.
Trait Implementations§
Source§impl Clone for UnixMtimeSeconds
impl Clone for UnixMtimeSeconds
Source§fn clone(&self) -> UnixMtimeSeconds
fn clone(&self) -> UnixMtimeSeconds
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 UnixMtimeSeconds
impl Debug for UnixMtimeSeconds
Source§impl Display for UnixMtimeSeconds
impl Display for UnixMtimeSeconds
Source§impl From<UnixMtimeSeconds> for u64
impl From<UnixMtimeSeconds> for u64
Source§fn from(mtime: UnixMtimeSeconds) -> Self
fn from(mtime: UnixMtimeSeconds) -> Self
Converts to this type from the input type.
Source§impl From<u64> for UnixMtimeSeconds
impl From<u64> for UnixMtimeSeconds
Source§impl Hash for UnixMtimeSeconds
impl Hash for UnixMtimeSeconds
Source§impl Ord for UnixMtimeSeconds
impl Ord for UnixMtimeSeconds
Source§fn cmp(&self, other: &UnixMtimeSeconds) -> Ordering
fn cmp(&self, other: &UnixMtimeSeconds) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for UnixMtimeSeconds
impl PartialEq for UnixMtimeSeconds
Source§fn eq(&self, other: &UnixMtimeSeconds) -> bool
fn eq(&self, other: &UnixMtimeSeconds) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for UnixMtimeSeconds
impl PartialOrd for UnixMtimeSeconds
Source§impl TryFrom<SystemTime> for UnixMtimeSeconds
impl TryFrom<SystemTime> for UnixMtimeSeconds
Source§type Error = ThumbnailError
type Error = ThumbnailError
The type returned in the event of a conversion error.
Source§fn try_from(time: SystemTime) -> Result<Self>
fn try_from(time: SystemTime) -> Result<Self>
Performs the conversion.
Source§impl TryFrom<i64> for UnixMtimeSeconds
impl TryFrom<i64> for UnixMtimeSeconds
impl Copy for UnixMtimeSeconds
impl Eq for UnixMtimeSeconds
impl StructuralPartialEq for UnixMtimeSeconds
Auto Trait Implementations§
impl Freeze for UnixMtimeSeconds
impl RefUnwindSafe for UnixMtimeSeconds
impl Send for UnixMtimeSeconds
impl Sync for UnixMtimeSeconds
impl Unpin for UnixMtimeSeconds
impl UnsafeUnpin for UnixMtimeSeconds
impl UnwindSafe for UnixMtimeSeconds
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more