Struct concordium_base::common::types::TransactionTime
source · pub struct TransactionTime {
pub seconds: u64,
}
Expand description
Datatype used to indicate transaction expiry.
Fields§
§seconds: u64
Seconds since the unix epoch.
Implementations§
source§impl TransactionTime
impl TransactionTime
sourcepub fn from_seconds(seconds: u64) -> Self
pub fn from_seconds(seconds: u64) -> Self
Construct a timestamp from seconds since the unix epoch.
sourcepub fn seconds_after(seconds: u32) -> Self
pub fn seconds_after(seconds: u32) -> Self
Construct a timestamp that is the given amount of seconds in the future.
sourcepub fn minutes_after(minutes: u32) -> Self
pub fn minutes_after(minutes: u32) -> Self
Construct a timestamp that is the given amount of minutes in the future.
sourcepub fn hours_after(hours: u32) -> Self
pub fn hours_after(hours: u32) -> Self
Construct a timestamp that is the given amount of hours in the future.
Trait Implementations§
source§impl Clone for TransactionTime
impl Clone for TransactionTime
source§fn clone(&self) -> TransactionTime
fn clone(&self) -> TransactionTime
Returns a copy of the value. Read more
1.0.0 · 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 TransactionTime
impl Debug for TransactionTime
source§impl Deserial for TransactionTime
impl Deserial for TransactionTime
fn deserial<GenericReaderType: ReadBytesExt>( source: &mut GenericReaderType ) -> ParseResult<Self>
source§impl<'de> Deserialize<'de> for TransactionTime
impl<'de> Deserialize<'de> for TransactionTime
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<u64> for TransactionTime
impl From<u64> for TransactionTime
source§impl FromStr for TransactionTime
impl FromStr for TransactionTime
source§impl Ord for TransactionTime
impl Ord for TransactionTime
source§fn cmp(&self, other: &TransactionTime) -> Ordering
fn cmp(&self, other: &TransactionTime) -> Ordering
1.21.0 · 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<TransactionTime> for TransactionTime
impl PartialEq<TransactionTime> for TransactionTime
source§fn eq(&self, other: &TransactionTime) -> bool
fn eq(&self, other: &TransactionTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<TransactionTime> for TransactionTime
impl PartialOrd<TransactionTime> for TransactionTime
source§fn partial_cmp(&self, other: &TransactionTime) -> Option<Ordering>
fn partial_cmp(&self, other: &TransactionTime) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serial for TransactionTime
impl Serial for TransactionTime
fn serial<GenericBufferType: Buffer>(&self, out: &mut GenericBufferType)
source§impl Serialize for TransactionTime
impl Serialize for TransactionTime
impl Copy for TransactionTime
impl Eq for TransactionTime
impl StructuralEq for TransactionTime
impl StructuralPartialEq for TransactionTime
Auto Trait Implementations§
impl RefUnwindSafe for TransactionTime
impl Send for TransactionTime
impl Sync for TransactionTime
impl Unpin for TransactionTime
impl UnwindSafe for TransactionTime
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