[−][src]Struct icu_datetime::date::MockDateTime
Temporary implementation of DateTimeType
,
which is used in tests, benchmarks and examples of this component.
Examples
use icu_datetime::date::MockDateTime; let dt = MockDateTime::try_new(2020, 9, 24, 13, 21, 0) .expect("Failed to construct DateTime.");
Fields
year: usize
month: Month
day: Day
hour: Hour
minute: Minute
second: Second
Implementations
impl MockDateTime
[src]
pub const fn new(
year: usize,
month: Month,
day: Day,
hour: Hour,
minute: Minute,
second: Second
) -> Self
[src]
year: usize,
month: Month,
day: Day,
hour: Hour,
minute: Minute,
second: Second
) -> Self
pub fn try_new(
year: usize,
month: usize,
day: usize,
hour: usize,
minute: usize,
second: usize
) -> Result<Self, DateTimeError>
[src]
year: usize,
month: usize,
day: usize,
hour: usize,
minute: usize,
second: usize
) -> Result<Self, DateTimeError>
Constructor for the MockDateTime
.
Examples
use icu_datetime::date::MockDateTime; let dt = MockDateTime::try_new(2020, 9, 24, 13, 21, 0) .expect("Failed to construct a DateTime");
Trait Implementations
impl DateTimeType for MockDateTime
[src]
fn year(&self) -> usize
[src]
fn month(&self) -> Month
[src]
fn day(&self) -> Day
[src]
fn hour(&self) -> Hour
[src]
fn minute(&self) -> Minute
[src]
fn second(&self) -> Second
[src]
impl Debug for MockDateTime
[src]
impl Default for MockDateTime
[src]
fn default() -> MockDateTime
[src]
impl FromStr for MockDateTime
[src]
Auto Trait Implementations
impl RefUnwindSafe for MockDateTime
impl Send for MockDateTime
impl Sync for MockDateTime
impl Unpin for MockDateTime
impl UnwindSafe for MockDateTime
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,