Struct openssh_sftp_client::UnixTimeStamp
[−]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
impl UnixTimeStamp
impl UnixTimeStamp
pub fn new(system_time: SystemTime) -> Result<UnixTimeStamp, UnixTimeStampError>
pub const fn unix_epoch() -> UnixTimeStamp
pub const fn unix_epoch() -> UnixTimeStamp
Return unix epoch, same as UnixTimeStamp::default
pub 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
impl Clone for UnixTimeStamp
impl Clone for UnixTimeStamp
fn clone(&self) -> UnixTimeStamp
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
impl Debug for UnixTimeStamp
impl Debug for UnixTimeStamp
impl Default for UnixTimeStamp
impl Default for UnixTimeStamp
fn default() -> UnixTimeStamp
fn default() -> UnixTimeStamp
Returns the “default value” for a type. Read more
impl<'de> Deserialize<'de> for UnixTimeStamp
impl<'de> Deserialize<'de> for UnixTimeStamp
fn deserialize<D>(
deserializer: D
) -> Result<UnixTimeStamp, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
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
impl Hash for UnixTimeStamp
impl Hash for UnixTimeStamp
impl PartialEq<UnixTimeStamp> for UnixTimeStamp
impl PartialEq<UnixTimeStamp> for UnixTimeStamp
fn eq(&self, other: &UnixTimeStamp) -> bool
fn eq(&self, other: &UnixTimeStamp) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &UnixTimeStamp) -> bool
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 · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more