pub struct Dating {
pub day: Day,
pub now: Option<Edtf>,
pub valid_time: Option<Edtf>,
pub language: Option<Tag>,
}Expand description
The time of an edit or a view: the day a person sees, and when they write.
A field shows its values as of Dating::day. Setting a field replaces what it shows
on that day, and keeps what belongs to other days. Values written get
Dating::valid_time if a person gave one, and otherwise, where a field with one value
has dated values, a date of their own (docs/spec/model.md, section 6).
Fields§
§day: DayThe day a person sees: today, unless they chose another.
now: Option<Edtf>The date and time of writing, with the device’s offset from UTC, when the day is today.
valid_time: Option<Edtf>When the values written are true, if the person said: a date for something that happened, an interval for a state.
language: Option<Tag>The language that the text, names and files written are in, if the person said.
Implementations§
Source§impl Dating
impl Dating
Sourcepub fn today(wall_millis: u64, offset_minutes: i32) -> Option<Self>
pub fn today(wall_millis: u64, offset_minutes: i32) -> Option<Self>
Today, at a moment in milliseconds since 1970 (UTC), at the device’s offset from UTC
in minutes. Returns None if the offset is outside the range from −12 to +14 hours.
Sourcepub fn with_valid_time(self, valid_time: Edtf) -> Self
pub fn with_valid_time(self, valid_time: Edtf) -> Self
The same, with the valid time that a person gave for the values written.
Sourcepub fn with_language(self, language: Tag) -> Self
pub fn with_language(self, language: Tag) -> Self
The same, with the language that a person gave for the values written.
Trait Implementations§
impl Eq for Dating
impl StructuralPartialEq for Dating
Auto Trait Implementations§
impl Forget for Dating
impl Freeze for Dating
impl Move for Dating
impl RefUnwindSafe for Dating
impl Send for Dating
impl Sync for Dating
impl Unpin for Dating
impl UnsafeUnpin for Dating
impl UnwindSafe for Dating
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.