Struct openssh_sftp_client::UnixTimeStamp
source · [−]pub struct UnixTimeStamp(_);
Expand description
Default value is 1970-01-01 00:00:00 UTC.
UnixTimeStamp stores number of seconds elapsed since 1970-01-01 00:00:00 UTC
as u32
.
Implementations
sourceimpl UnixTimeStamp
impl UnixTimeStamp
pub fn new(system_time: SystemTime) -> Result<UnixTimeStamp, UnixTimeStampError>
sourcepub const fn unix_epoch() -> UnixTimeStamp
pub const fn unix_epoch() -> UnixTimeStamp
Return unix epoch, same as UnixTimeStamp::default
sourcepub fn from_raw(elapsed: u32) -> Option<UnixTimeStamp>
pub fn from_raw(elapsed: u32) -> Option<UnixTimeStamp>
Return None
if std::time::SystemTime
cannot hold the timestamp.
pub fn into_raw(self) -> u32
pub fn as_duration(self) -> Duration
pub fn as_system_time(self) -> SystemTime
Trait Implementations
sourceimpl Clone for UnixTimeStamp
impl Clone for UnixTimeStamp
sourcepub fn clone(&self) -> UnixTimeStamp
pub fn clone(&self) -> UnixTimeStamp
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UnixTimeStamp
impl Debug for UnixTimeStamp
sourceimpl Default for UnixTimeStamp
impl Default for UnixTimeStamp
sourcepub fn default() -> UnixTimeStamp
pub fn default() -> UnixTimeStamp
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for UnixTimeStamp
impl<'de> Deserialize<'de> for UnixTimeStamp
sourcepub fn deserialize<D>(
deserializer: D
) -> Result<UnixTimeStamp, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
deserializer: D
) -> Result<UnixTimeStamp, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for UnixTimeStamp
impl Hash for UnixTimeStamp
sourceimpl PartialEq<UnixTimeStamp> for UnixTimeStamp
impl PartialEq<UnixTimeStamp> for UnixTimeStamp
sourcepub fn eq(&self, other: &UnixTimeStamp) -> bool
pub fn eq(&self, other: &UnixTimeStamp) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &UnixTimeStamp) -> bool
pub fn ne(&self, other: &UnixTimeStamp) -> bool
This method tests for !=
.
impl Copy for UnixTimeStamp
impl Eq for UnixTimeStamp
impl StructuralEq for UnixTimeStamp
impl StructuralPartialEq for UnixTimeStamp
Auto Trait Implementations
impl RefUnwindSafe for UnixTimeStamp
impl Send for UnixTimeStamp
impl Sync for UnixTimeStamp
impl Unpin for UnixTimeStamp
impl UnwindSafe for UnixTimeStamp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more