Struct Time

struct Time { ... }

A parsed TOML time value

May be part of a Datetime. Alone, Time corresponds to a Local Time. From the TOML v1.0.0 spec:

If you include only the time portion of an RFC 3339 formatted date-time, it will represent that time of day without any relation to a specific day or any offset or timezone.

lt1 = 07:32:00
lt2 = 00:32:00.999999

Millisecond precision is required. Further precision of fractional seconds is implementation-specific. If the value contains greater precision than the implementation can support, the additional precision must be truncated, not rounded.

Fields

hour: u8

Hour: 0 to 23

minute: u8

Minute: 0 to 59

second: u8

Second: 0 to {58, 59, 60} (based on leap second rules)

nanosecond: u32

Nanosecond: 0 to 999_999_999

Implementations

impl Clone for Time

fn clone(self: &Self) -> Time

impl Copy for Time

impl Debug for Time

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

impl Display for Time

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

impl Eq for Time

impl Freeze for Time

impl Ord for Time

fn cmp(self: &Self, other: &Time) -> Ordering

impl PartialEq for Time

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

impl PartialOrd for Time

fn partial_cmp(self: &Self, other: &Time) -> Option<Ordering>

impl RefUnwindSafe for Time

impl Send for Time

impl Serialize for Time

fn serialize<S>(self: &Self, serializer: S) -> Result<<S as >::Ok, <S as >::Error>
where
    S: Serializer

impl StructuralPartialEq for Time

impl Sync for Time

impl Unpin for Time

impl UnsafeUnpin for Time

impl UnwindSafe for Time

impl<'de> Deserialize for Time

fn deserialize<D>(deserializer: D) -> Result<Self, <D as >::Error>
where
    D: Deserializer<'de>

impl<T> Any for Time

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Time

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

impl<T> BorrowMut for Time

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

impl<T> CloneToUninit for Time

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

impl<T> DeserializeOwned for Time

impl<T> From for Time

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Time

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

impl<T> ToString for Time

fn to_string(self: &Self) -> String

impl<T, U> Into for Time

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 Time

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

impl<T, U> TryInto for Time

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