#[non_exhaustive]pub struct LocalDateTime(/* private fields */);Expand description
A date-time string without a timezone offset (RFC 8984 §1.4.5).
Format: YYYY-MM-DDTHH:MM:SS (no Z, no ±offset).
§Validation
The From<String> and From<&str> constructors accept any string
without validating against the RFC 8984 §1.4.5 ABNF. This is
deliberate: parsing the format is left to the backend (per PLAN.md)
to avoid pulling in a heavy date-time parser dependency. Callers
MUST treat the inner string as opaque-but-presumed-well-formed and
validate at the system boundary.
Trait Implementations§
Source§impl AsRef<str> for LocalDateTime
impl AsRef<str> for LocalDateTime
Source§impl Clone for LocalDateTime
impl Clone for LocalDateTime
Source§fn clone(&self) -> LocalDateTime
fn clone(&self) -> LocalDateTime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalDateTime
impl Debug for LocalDateTime
Source§impl<'de> Deserialize<'de> for LocalDateTime
impl<'de> Deserialize<'de> for LocalDateTime
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LocalDateTime, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LocalDateTime, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for LocalDateTime
impl Display for LocalDateTime
impl Eq for LocalDateTime
Source§impl From<&str> for LocalDateTime
impl From<&str> for LocalDateTime
Source§fn from(s: &str) -> LocalDateTime
fn from(s: &str) -> LocalDateTime
Converts to this type from the input type.
Source§impl From<String> for LocalDateTime
impl From<String> for LocalDateTime
Source§fn from(s: String) -> LocalDateTime
fn from(s: String) -> LocalDateTime
Converts to this type from the input type.
Source§impl Hash for LocalDateTime
impl Hash for LocalDateTime
Source§impl Ord for LocalDateTime
impl Ord for LocalDateTime
Source§fn cmp(&self, other: &LocalDateTime) -> Ordering
fn cmp(&self, other: &LocalDateTime) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for LocalDateTime
impl PartialEq for LocalDateTime
Source§impl PartialOrd for LocalDateTime
impl PartialOrd for LocalDateTime
Source§impl Serialize for LocalDateTime
impl Serialize for LocalDateTime
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LocalDateTime
Auto Trait Implementations§
impl Freeze for LocalDateTime
impl RefUnwindSafe for LocalDateTime
impl Send for LocalDateTime
impl Sync for LocalDateTime
impl Unpin for LocalDateTime
impl UnsafeUnpin for LocalDateTime
impl UnwindSafe for LocalDateTime
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