Struct datetime::Duration [] [src]

pub struct Duration { /* fields omitted */ }

A duration is a length of time on the timeline, irrespective of time zone or calendar format, with millisecond precision.

Methods

impl Duration
[src]

[src]

Create a new zero-length duration.

[src]

Create a new duration that’s the given number of seconds long.

[src]

Create a new duration that’s the given number of seconds and milliseconds long.

[src]

Return the seconds and milliseconds portions of the duration as a 2-element tuple.

Trait Implementations

impl Clone for Duration
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Duration
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for Duration
[src]

impl Debug for Duration
[src]

[src]

Formats the value using the given formatter.

impl Copy for Duration
[src]

impl Add<Duration> for Duration
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Sub<Duration> for Duration
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Mul<i64> for Duration
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.