pub struct KgSnapshot {
pub id: SnapshotId,
pub namespace: String,
pub parent_id: Option<SnapshotId>,
pub message: String,
pub author: Option<String>,
pub created_at: i64,
pub entity_count: u64,
pub edge_count: u64,
}Expand description
Immutable point-in-time capture of a namespace’s entity and edge set.
id is the SHA-256 hash of the deterministically serialized archive.
The archive itself is stored separately in kg_snapshot_archives.
Fields§
§id: SnapshotIdContent hash — also the primary key in kg_snapshots.
namespace: StringNamespace this snapshot belongs to.
parent_id: Option<SnapshotId>Previous snapshot in this branch’s history. None for the genesis commit.
message: StringHuman-readable description of the changes since the previous snapshot.
Agent or user identifier for attribution. Optional.
created_at: i64Unix microseconds (i64) — compatible with the existing substrate timestamp convention.
entity_count: u64Number of entities in this snapshot.
edge_count: u64Number of edges in this snapshot.
Trait Implementations§
Source§impl Clone for KgSnapshot
impl Clone for KgSnapshot
Source§fn clone(&self) -> KgSnapshot
fn clone(&self) -> KgSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KgSnapshot
impl Debug for KgSnapshot
Source§impl<'de> Deserialize<'de> for KgSnapshot
impl<'de> Deserialize<'de> for KgSnapshot
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
Auto Trait Implementations§
impl Freeze for KgSnapshot
impl RefUnwindSafe for KgSnapshot
impl Send for KgSnapshot
impl Sync for KgSnapshot
impl Unpin for KgSnapshot
impl UnsafeUnpin for KgSnapshot
impl UnwindSafe for KgSnapshot
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