pub struct DateTime { /* private fields */ }
Expand description

A date/time value. This is a wrapper around the chrono type with extra functionality for obtaining ticks in OPC UA measurements, endtimes, epoch etc.

Implementations

Constructs from the current time

Constructs from the current time with an offset

Creates a null date time (i.e. the epoch)

Tests if the date time is null (i.e. equal to epoch)

Constructs a date time for the epoch

Constructs a date time for the endtimes

Returns the maximum tick value, corresponding to the end of time

Constructs from a year, month, day

Constructs from a year, month, day, hour, minute, second

Constructs from a year, month, day, hour, minute, second, nanosecond

Returns the time in ticks, of 100 nanosecond intervals

To checked ticks. Function returns 0 or MAX_INT64 if date exceeds valid OPC UA range

Time as chrono

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

DateTime encoded as 64-bit signed int

Returns the exact byte length of the structure as it would be if encode were called. This may be called prior to writing to ensure the correct amount of space is available. Read more

Encodes the instance to the write stream.

Decodes an instance from the read stream. The decoding options contains restrictions set by the server / client on the length of strings, arrays etc. If these limits are exceeded the implementation should return with a BadDecodingError as soon as possible. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Converts this type into the (usually inferred) input type.

Converts this type into the (usually inferred) input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.