pub struct DateTime {
pub year: Option<i64>,
pub month: Option<i64>,
pub day: Option<i64>,
pub hour: Option<i64>,
pub minute: Option<i64>,
pub second: Option<i64>,
}Expand description
A struct representing a date and time with optional fields.
§Examples
use typwire::DateTime;
let dt = DateTime::builder().year(2025).month(12).day(3).build();
assert_eq!(dt.year, Some(2025));
assert_eq!(dt.month, Some(12));Fields§
§year: Option<i64>§month: Option<i64>§day: Option<i64>§hour: Option<i64>§minute: Option<i64>§second: Option<i64>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DateTime
impl<'de> Deserialize<'de> for DateTime
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl Freeze for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)