[][src]Struct koibumi_core::time::Time

pub struct Time(_);

Represents a point in time used by the Bitmessage protocol.

Implementations

impl Time[src]

pub fn now() -> Self[src]

Constructs a current time.

pub const fn new(secs: u64) -> Self[src]

Constructs a time from a number of seconds since the UNIX epoch.

pub fn as_secs(self) -> u64[src]

Returns the number of seconds since the UNIX epoch this object represents as u64.

pub fn checked_add(self, duration: Duration) -> Option<Self>[src]

Checked addition. Computes self + duration, returning None if overflow occurred.

Trait Implementations

impl Clone for Time[src]

impl Copy for Time[src]

impl Debug for Time[src]

impl Eq for Time[src]

impl From<SystemTime> for Time[src]

impl From<Time> for SystemTime[src]

impl From<u64> for Time[src]

impl Hash for Time[src]

impl LenBm for Time[src]

impl Ord for Time[src]

impl PartialEq<Time> for Time[src]

impl PartialOrd<Time> for Time[src]

impl ReadFrom for Time[src]

impl StructuralEq for Time[src]

impl StructuralPartialEq for Time[src]

impl WriteTo for Time[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReadFromExact for T where
    T: ReadFrom
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.