#[repr(transparent)]pub struct ZettelId(pub u64);
Expand description
Each Zettel is associated with a unique ID, which is based on a timestamp of when the Zettel was created,
turned into a single number, but retaining most of its human-readability. For example, a Zettel created when
this comment was written would have the form (with dashes inserted for readability) 12021-07-04-23-32-24
. This
allows a Zettel to be created every second, which I think will be okay for real-world purposes.
The time in the timestamp is UTC+0, and the date uses the Holocene calendar.
Tuple Fields§
§0: u64
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ZettelId
impl<'de> Deserialize<'de> for ZettelId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ZettelId
impl StructuralPartialEq for ZettelId
Auto Trait Implementations§
impl Freeze for ZettelId
impl RefUnwindSafe for ZettelId
impl Send for ZettelId
impl Sync for ZettelId
impl Unpin for ZettelId
impl UnwindSafe for ZettelId
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