pub enum Timestamp {
At(SystemTime),
Text(String),
}Expand description
A point in time for a from/to filter: a SystemTime, or text Core parses
itself (ISO 8601 with an offset, e.g. 2026-10-27T09:00:00+01:00).
§Examples
use std::time::{Duration, SystemTime};
use dinio_sdk::Timestamp;
let week_ago: Timestamp = (SystemTime::now() - Duration::from_secs(7 * 86_400)).into();
let fixed: Timestamp = "2026-10-27T00:00:00Z".into();Variants§
At(SystemTime)
Sent as UTC, whole seconds.
Text(String)
Sent as given; Core answers ErrorCode::Validation
if it is not ISO 8601 with an offset.
Trait Implementations§
impl Eq for Timestamp
Source§impl From<SystemTime> for Timestamp
impl From<SystemTime> for Timestamp
Source§fn from(time: SystemTime) -> Self
fn from(time: SystemTime) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnsafeUnpin for Timestamp
impl UnwindSafe for Timestamp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.