Enum OffsetPrecision

pub enum OffsetPrecision

The precision of an offset from UTC formatting item.

Variants

Hours

Format offset from UTC as only hours. Not recommended, it is not uncommon for timezones to have an offset of 30 minutes, 15 minutes, etc. Any minutes and seconds get truncated.

Minutes

Format offset from UTC as hours and minutes. Any seconds will be rounded to the nearest minute.

Seconds

Format offset from UTC as hours, minutes and seconds.

OptionalMinutes

Format offset from UTC as hours, and optionally with minutes. Any seconds will be rounded to the nearest minute.

OptionalSeconds

Format offset from UTC as hours and minutes, and optionally seconds.

OptionalMinutesAndSeconds

Format offset from UTC as hours and optionally minutes and seconds.

Trait Implementations

impl Clone for OffsetPrecision

fn clone(&self) -> Self

impl Copy for OffsetPrecision

impl Debug for OffsetPrecision

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for OffsetPrecision

impl Hash for OffsetPrecision

fn hash<__H: Hasher>(&self, state: &mut __H)

impl PartialEq for OffsetPrecision

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for OffsetPrecision

Auto Trait Implementations

impl Freeze for OffsetPrecision

impl RefUnwindSafe for OffsetPrecision

impl Send for OffsetPrecision

impl Sync for OffsetPrecision

impl Unpin for OffsetPrecision

impl UnsafeUnpin for OffsetPrecision

impl UnwindSafe for OffsetPrecision

Blanket Implementations

impl<T> Any for OffsetPrecision where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for OffsetPrecision where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for OffsetPrecision where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for OffsetPrecision where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for OffsetPrecision

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for OffsetPrecision where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for OffsetPrecision where U: From<T>,

fn into(self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom<U> for OffsetPrecision where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for OffsetPrecision where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>