pub struct DateTimeOrUtc;
Implementations§
Source§impl DateTimeOrUtc
impl DateTimeOrUtc
pub fn serialize<S>(x: &DateTime<Utc>, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
pub fn deserialize<'de, D>(deserializer: D) -> Result<DateTime<Utc>, D::Error>where
D: Deserializer<'de>,
Trait Implementations§
Source§impl<'de> DeserializeAs<'de, DateTime<Utc>> for DateTimeOrUtc
impl<'de> DeserializeAs<'de, DateTime<Utc>> for DateTimeOrUtc
Source§fn deserialize_as<D>(deserializer: D) -> Result<DateTime<Utc>, D::Error>where
D: Deserializer<'de>,
fn deserialize_as<D>(deserializer: D) -> Result<DateTime<Utc>, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer.
Source§impl JsonSchema for DateTimeOrUtc
impl JsonSchema for DateTimeOrUtc
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(_gen: &mut SchemaGenerator) -> Schema
fn json_schema(_gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl SerializeAs<DateTime<Utc>> for DateTimeOrUtc
impl SerializeAs<DateTime<Utc>> for DateTimeOrUtc
Source§fn serialize_as<S>(x: &DateTime<Utc>, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
fn serialize_as<S>(x: &DateTime<Utc>, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
Serialize this value into the given Serde serializer.
Auto Trait Implementations§
impl Freeze for DateTimeOrUtc
impl RefUnwindSafe for DateTimeOrUtc
impl Send for DateTimeOrUtc
impl Sync for DateTimeOrUtc
impl Unpin for DateTimeOrUtc
impl UnwindSafe for DateTimeOrUtc
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