pub struct Meta {
pub author: Identity,
pub origin_system: String,
pub created: i64,
pub updated: i64,
pub labels: BTreeMap<String, String>,
}Expand description
Provenance and labels for a record.
Fields§
§origin_system: String§created: i64When this record was first written, in ms since the Unix epoch. Stamped by the store and carried across every edit; a recreation over a tombstone starts a new one, because that is a new record at an old key (gonzalo#293).
updated: i64When this record was last written, in ms since the Unix epoch. Stamped
by the store, including on a delete, where it equals the tombstone’s
deleted_at. A replication write keeps the source’s times rather than
restamping, so syncing is not an edit.
labels: BTreeMap<String, String>Implementations§
Source§impl Meta
impl Meta
Sourcepub fn new(author: Identity, origin_system: impl Into<String>) -> Self
pub fn new(author: Identity, origin_system: impl Into<String>) -> Self
Provenance for a write by author from origin_system, with no labels.
created and updated are left at 0 and the store stamps them on
write (gonzalo#293), so there is nothing useful to pass here. Set the
fields directly for labels.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Meta
impl<'de> Deserialize<'de> for Meta
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 Meta
impl StructuralPartialEq for Meta
Auto Trait Implementations§
impl Freeze for Meta
impl RefUnwindSafe for Meta
impl Send for Meta
impl Sync for Meta
impl Unpin for Meta
impl UnsafeUnpin for Meta
impl UnwindSafe for Meta
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