pub struct Time(pub Time);
Expand description
An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond
Tuple Fields§
§0: Time
Implementations§
source§impl Time
impl Time
sourcepub fn create(
hour: u8,
minute: u8,
second: u8,
nanosecond: u32,
) -> Result<Box<Time>, CalendarError>
pub fn create( hour: u8, minute: u8, second: u8, nanosecond: u32, ) -> Result<Box<Time>, CalendarError>
Creates a new Time
given field values
sourcepub fn from_string(v: &DiplomatStr) -> Result<Box<Time>, CalendarParseError>
pub fn from_string(v: &DiplomatStr) -> Result<Box<Time>, CalendarParseError>
Creates a new Time
from an IXDTF string.
sourcepub fn midnight() -> Result<Box<Time>, CalendarError>
pub fn midnight() -> Result<Box<Time>, CalendarError>
Creates a new Time
representing midnight (00:00.000).
sourcepub fn nanosecond(&self) -> u32
pub fn nanosecond(&self) -> u32
Returns the nanosecond in this time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more