pub struct WithUnixTimestamp;Expand description
A custom UnixTimestamp implementation that doesn’t have an error. making it compatible with infallible error types
Trait Implementations§
Source§impl ArchiveWith<SystemTime> for WithUnixTimestamp
impl ArchiveWith<SystemTime> for WithUnixTimestamp
Source§fn resolve_with(
field: &SystemTime,
resolver: Self::Resolver,
out: Place<Self::Archived>,
)
fn resolve_with( field: &SystemTime, resolver: Self::Resolver, out: Place<Self::Archived>, )
Resolves the archived type using a reference to the field type
F.Source§impl<D> DeserializeWith<<Duration as Archive>::Archived, SystemTime, D> for WithUnixTimestampwhere
D: Fallible + ?Sized,
impl<D> DeserializeWith<<Duration as Archive>::Archived, SystemTime, D> for WithUnixTimestampwhere
D: Fallible + ?Sized,
Source§fn deserialize_with(
field: &Archived<Duration>,
_: &mut D,
) -> Result<SystemTime, D::Error>
fn deserialize_with( field: &Archived<Duration>, _: &mut D, ) -> Result<SystemTime, D::Error>
Deserializes the field type
F using the given deserializer.Source§impl<S> SerializeWith<SystemTime, S> for WithUnixTimestampwhere
S: Fallible + ?Sized,
impl<S> SerializeWith<SystemTime, S> for WithUnixTimestampwhere
S: Fallible + ?Sized,
Source§fn serialize_with(
field: &SystemTime,
s: &mut S,
) -> Result<Self::Resolver, S::Error>
fn serialize_with( field: &SystemTime, s: &mut S, ) -> Result<Self::Resolver, S::Error>
Serializes the field type
F using the given serializer.Auto Trait Implementations§
impl Freeze for WithUnixTimestamp
impl RefUnwindSafe for WithUnixTimestamp
impl Send for WithUnixTimestamp
impl Sync for WithUnixTimestamp
impl Unpin for WithUnixTimestamp
impl UnwindSafe for WithUnixTimestamp
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.