Struct easyfix_messages::fields::UtcTimestamp
source · pub struct UtcTimestamp { /* private fields */ }
Implementations§
source§impl UtcTimestamp
impl UtcTimestamp
pub const MAX_UTC: UtcTimestamp = _
pub const MIN_UTC: 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
sourcepub fn format_precisely(&self) -> DelayedFormat<StrftimeItems<'_>>
pub fn format_precisely(&self) -> DelayedFormat<StrftimeItems<'_>>
Formats timestamp with precision set inside the struct
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 Default for UtcTimestamp
impl Default for UtcTimestamp
source§fn default() -> UtcTimestamp
fn default() -> UtcTimestamp
Returns the “default value” for a type. Read more
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
source§impl Ord for UtcTimestamp
impl Ord for UtcTimestamp
source§impl PartialEq for UtcTimestamp
impl PartialEq for UtcTimestamp
source§impl PartialOrd for UtcTimestamp
impl PartialOrd for UtcTimestamp
source§impl Serialize for UtcTimestamp
impl Serialize for UtcTimestamp
impl Copy for UtcTimestamp
impl Eq for UtcTimestamp
Auto Trait Implementations§
impl Freeze for UtcTimestamp
impl RefUnwindSafe for UtcTimestamp
impl Send for UtcTimestamp
impl Sync for UtcTimestamp
impl Unpin for UtcTimestamp
impl UnwindSafe for UtcTimestamp
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)