#[non_exhaustive]pub struct Duration {
pub nanos: Option<i32>,
pub seconds: Option<i64>,
/* private fields */
}Available on crate features
backend-services or future-reservations or instance-group-manager-resize-requests or instance-templates or instances or licenses or machine-images or node-groups or region-backend-services or region-commitments or region-instance-templates or region-instances or region-notification-endpoints or region-url-maps or reservations or url-maps only.Expand description
A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like “day” or “month”. Range is approximately 10,000 years.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.nanos: Option<i32>Span of time that’s a fraction of a second at nanosecond resolution.
Durations less than one second are represented with a 0
seconds field and a positive nanos field. Must be from 0
to 999,999,999 inclusive.
seconds: Option<i64>Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Implementations§
Trait Implementations§
impl StructuralPartialEq for Duration
Auto Trait Implementations§
impl Freeze for Duration
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnwindSafe for Duration
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