Struct icu::datetime::date::GmtOffset [−][src]
pub struct GmtOffset(_);
Expand description
The GMT offset in seconds for a MockTimeZone
.
Implementations
Trait Implementations
Parse a GmtOffset
from a string.
The offset must range from GMT-12 to GMT+14. The string must be an ISO 8601 time zone designator: e.g. Z e.g. +05 e.g. +0500 e.g. +05:00
Examples
use icu::datetime::date::GmtOffset; let offset0: GmtOffset = "Z".parse().expect("Failed to parse a GMT offset."); let offset1: GmtOffset = "-09".parse().expect("Failed to parse a GMT offset."); let offset2: GmtOffset = "-0930".parse().expect("Failed to parse a GMT offset."); let offset3: GmtOffset = "-09:30".parse().expect("Failed to parse a GMT offset.");
type Err = DateTimeError
type Err = DateTimeError
The associated error which can be returned from parsing.
Auto Trait Implementations
impl RefUnwindSafe for GmtOffset
impl UnwindSafe for GmtOffset
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn clone_into_box(&self) -> Box<dyn ErasedDataStruct + 'static, Global>
pub fn clone_into_box(&self) -> Box<dyn ErasedDataStruct + 'static, Global>
Clone this trait object reference, returning a boxed trait object.