Trait TomlDateTimeSerde

Source
pub trait TomlDateTimeSerde {
    // Required methods
    fn deserialize<'de, D: Deserializer<'de>>(
        deserializer: D,
    ) -> StdResult<Self, D::Error>
       where Self: Sized;
    fn serialize<S: Serializer>(
        value: &Self,
        serializer: S,
    ) -> StdResult<S::Ok, S::Error>;
}
Expand description

Used to implement serialization atop FromToTomlDateTime for TomlDatetime and various container types.

Required Methods§

Source

fn deserialize<'de, D: Deserializer<'de>>( deserializer: D, ) -> StdResult<Self, D::Error>
where Self: Sized,

Deserializes into a Self.

Source

fn serialize<S: Serializer>( value: &Self, serializer: S, ) -> StdResult<S::Ok, S::Error>

Serializes a Self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: FromToTomlDateTime> TomlDateTimeSerde for Option<T>

Source§

fn deserialize<'de, D: Deserializer<'de>>( deserializer: D, ) -> StdResult<Self, D::Error>

Source§

fn serialize<S: Serializer>( value: &Self, serializer: S, ) -> StdResult<S::Ok, S::Error>

Implementors§