Enum OffsetPrecision

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.

Implementations

impl Clone for OffsetPrecision

fn clone(self: &Self) -> OffsetPrecision

impl Copy for OffsetPrecision

impl Debug for OffsetPrecision

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

impl Eq for OffsetPrecision

impl Freeze for OffsetPrecision

impl Hash for OffsetPrecision

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

impl PartialEq for OffsetPrecision

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

impl RefUnwindSafe for OffsetPrecision

impl Send for OffsetPrecision

impl StructuralPartialEq for OffsetPrecision

impl Sync for OffsetPrecision

impl Unpin for OffsetPrecision

impl UnwindSafe for OffsetPrecision

impl<T> Any for OffsetPrecision

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for OffsetPrecision

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for OffsetPrecision

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

impl<T> CloneToUninit for OffsetPrecision

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

impl<T> From for OffsetPrecision

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for OffsetPrecision

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for OffsetPrecision

fn into(self: 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 for OffsetPrecision

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for OffsetPrecision

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