Struct easyfix_messages::fields::UtcTimestamp
source · pub struct UtcTimestamp { /* private fields */ }Implementations§
source§impl UtcTimestamp
impl UtcTimestamp
sourcepub fn now() -> UtcTimestamp
pub fn now() -> UtcTimestamp
Creates UtcTimestamp that represents current date and time with default precision
sourcepub fn with_precision(
date_time: DateTime<Utc>,
precision: TimePrecision
) -> UtcTimestamp
pub fn with_precision(
date_time: DateTime<Utc>,
precision: TimePrecision
) -> UtcTimestamp
Creates UtcTimestamp with given time precision input’s precision is adjusted to requested one
sourcepub fn with_secs(date_time: DateTime<Utc>) -> UtcTimestamp
pub fn with_secs(date_time: DateTime<Utc>) -> UtcTimestamp
Creates UtcTimestamp with time precision set to full seconds input’s precision is adjusted to requested one
pub fn now_with_secs() -> UtcTimestamp
sourcepub fn with_millis(date_time: DateTime<Utc>) -> UtcTimestamp
pub fn with_millis(date_time: DateTime<Utc>) -> UtcTimestamp
Creates UtcTimestamp with time precision set to milliseconds input’s precision is adjusted to requested one
sourcepub fn with_micros(date_time: DateTime<Utc>) -> UtcTimestamp
pub fn with_micros(date_time: DateTime<Utc>) -> UtcTimestamp
Creates UtcTimestamp with time precision set to microseconds input’s precision is adjusted to requested one
sourcepub fn with_nanos(date_time: DateTime<Utc>) -> UtcTimestamp
pub fn with_nanos(date_time: DateTime<Utc>) -> UtcTimestamp
Creates UtcTimestamp with time precision set to nanoseconds input’s precision is adjusted to requested one
pub fn format<'a>(&self, fmt: &'a str) -> DelayedFormat<StrftimeItems<'a>>
pub fn timestamp(&self) -> DateTime<Utc>
pub fn precision(&self) -> TimePrecision
Trait Implementations§
source§impl Clone for UtcTimestamp
impl Clone for UtcTimestamp
source§fn clone(&self) -> UtcTimestamp
fn clone(&self) -> UtcTimestamp
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 UtcTimestamp
impl Debug for UtcTimestamp
source§impl<'de> Deserialize<'de> for UtcTimestamp
impl<'de> Deserialize<'de> for UtcTimestamp
source§fn deserialize<D>(deserializer: D) -> Result<UtcTimestamp, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<UtcTimestamp, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more