Struct persistent_time::Time [] [src]

pub struct Time { /* fields omitted */ }

Methods

impl Time
[src]

Methods from Deref<Target = DateTime<Local>>

Retrieves a date component.

Retrieves a time component. Unlike date, this is not associated to the time zone.

Returns the number of non-leap seconds since January 1, 1970 0:00:00 UTC (aka "UNIX timestamp").

Returns the number of milliseconds since the last second boundary

warning: in event of a leap second, this may exceed 999

note: this is not the number of milliseconds since January 1, 1970 0:00:00 UTC

Returns the number of microseconds since the last second boundary

warning: in event of a leap second, this may exceed 999_999

note: this is not the number of microseconds since January 1, 1970 0:00:00 UTC

Returns the number of nanoseconds since the last second boundary

warning: in event of a leap second, this may exceed 999_999_999

note: this is not the number of nanoseconds since January 1, 1970 0:00:00 UTC

Deprecated: Same to DateTime::timestamp.

Retrieves an associated offset from UTC.

Retrieves an associated time zone.

Changes the associated time zone. This does not change the actual DateTime (but will change the string representation).

Adds given Duration to the current date and time.

Returns None when it will result in overflow.

Subtracts given Duration from the current date and time.

Returns None when it will result in overflow.

Returns a view to the naive UTC datetime.

Returns a view to the naive local datetime.

Returns an RFC 2822 date and time string such as Tue, 1 Jul 2003 10:52:37 +0200.

Returns an RFC 3339 and ISO 8601 date and time string such as 1996-12-19T16:39:57-08:00.

Formats the combined date and time with the specified formatting items.

Formats the combined date and time with the specified format string. See the format::strftime module on the supported escape sequences.

Trait Implementations

impl Debug for Time
[src]

Formats the value using the given formatter.

impl Copy for Time
[src]

impl Clone for Time
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Time
[src]

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

This method tests for !=.

impl Eq for Time
[src]

impl Deref for Time
[src]

The resulting type after dereferencing

The method called to dereference a value

impl Encodable for Time
[src]

Serialize a value using an Encoder.

impl Decodable for Time
[src]

Deserialize a value using a Decoder.

impl FromSql for Time
[src]

Creates a new value of this type from a Reader of the binary format of the specified Postgres Type. Read more

Determines if a value of this type can be created from the specified Postgres Type. Read more

Creates a new value of this type from a NULL SQL value. Read more

impl ToSql for Time
[src]

Converts the value of self into the binary format of the specified Postgres Type, writing it to out. Read more

Determines if a value of this type can be converted to the specified Postgres Type. Read more

An adaptor method used internally by Rust-Postgres. Read more

impl ToRedisArgs for Time
[src]

This converts the value into a vector of bytes. Each item is a single argument. Most items generate a vector of a single item. Read more

Returns an information about the contained value with regards to it's numeric behavior in a redis context. This is used in some high level concepts to switch between different implementations of redis functions (for instance INCR vs INCRBYFLOAT). Read more

Returns an indiciation if the value contained is exactly one argument. It returns false if it's zero or more than one. This is used in some high level functions to intelligently switch between GET and MGET variants. Read more

impl FromRedisValue for Time
[src]

Given a redis Value this attempts to convert it into the given destination type. If that fails because it's not compatible an appropriate error is generated. Read more

Similar to from_redis_value but constructs a vector of objects from another vector of values. This primarily exists internally to customize the behavior for vectors of tuples. Read more