Struct opcua_types::date_time::DateTime
[−]
[src]
pub struct DateTime { pub date_time: DateTime<Utc>, }
Data type ID 13 Holds a date/time. This is a wrapper around the chrono type with extra functionality for obtaining ticks in OPC UA measurements, endtimes, epoch etc.
Fields
date_time: DateTime<Utc>
Methods
impl DateTime
[src]
fn now() -> DateTime
[src]
Constructs from the current time
fn epoch() -> DateTime
[src]
Constructs a date time for the epoch
fn endtimes() -> DateTime
[src]
Constructs a date time for the endtimes
fn endtimes_ticks() -> i64
[src]
Returns the maximum tick value, corresponding to the end of time
fn ymd(year: UInt16, month: UInt16, day: UInt16) -> DateTime
[src]
Constructs from a year, month, day
fn ymd_hms(
year: UInt16,
month: UInt16,
day: UInt16,
hour: UInt16,
minute: UInt16,
second: UInt16
) -> DateTime
[src]
year: UInt16,
month: UInt16,
day: UInt16,
hour: UInt16,
minute: UInt16,
second: UInt16
) -> DateTime
Constructs from a year, month, day, hour, minute, second
fn ymd_hms_nano(
year: UInt16,
month: UInt16,
day: UInt16,
hour: UInt16,
minute: UInt16,
second: UInt16,
nanos: UInt32
) -> DateTime
[src]
year: UInt16,
month: UInt16,
day: UInt16,
hour: UInt16,
minute: UInt16,
second: UInt16,
nanos: UInt32
) -> DateTime
Constructs from a year, month, day, hour, minute, second, nanosecond
fn ticks(&self) -> i64
[src]
Returns the time in ticks, of 100 nanosecond intervals
fn checked_ticks(&self) -> i64
[src]
To checked ticks. Function returns 0 or MAX_INT64 if date exceeds valid OPC UA range
fn as_chrono(&self) -> DateTime<Utc>
[src]
Time as chrono
Trait Implementations
impl PartialEq for DateTime
[src]
fn eq(&self, __arg_0: &DateTime) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DateTime) -> bool
[src]
This method tests for !=
.
impl Debug for DateTime
[src]
impl Clone for DateTime
[src]
fn clone(&self) -> DateTime
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl BinaryEncoder<DateTime> for DateTime
[src]
DateTime encoded as 64-bit signed int
fn byte_len(&self) -> usize
[src]
Returns the byte length of the structure. This calculation should be exact and as efficient as possible. Read more
fn encode<S: Write>(&self, stream: &mut S) -> EncodingResult<usize>
[src]
Encodes the instance to the write stream.
fn decode<S: Read>(stream: &mut S) -> EncodingResult<Self>
[src]
Decodes an instance from the read stream.
impl Default for DateTime
[src]
impl From<(UInt16, UInt16, UInt16, UInt16, UInt16, UInt16)> for DateTime
[src]
impl From<(UInt16, UInt16, UInt16, UInt16, UInt16, UInt16, UInt32)> for DateTime
[src]
fn from(dt: (UInt16, UInt16, UInt16, UInt16, UInt16, UInt16, UInt32)) -> Self
[src]
Performs the conversion.