pub struct CommitContentV0 {
pub author: Digest,
pub branch: BranchId,
pub perms: Vec<ObjectId>,
pub header_keys: Option<CommitHeaderKeys>,
pub quorum: QuorumType,
pub timestamp: Timestamp,
pub metadata: Vec<u8>,
pub body: ObjectRef,
}
Expand description
Content of a Commit
Fields§
Commit author (a hash of UserId) BLAKE3 keyed hash over UserId
- key: BLAKE3 derive_key (“NextGraph UserId Hash Overlay Id for Commit BLAKE3 key”, overlayId) hash will be different than for ForwardedPeerAdvertV0 so that core brokers dealing with public sites wont be able to correlate commits and editing peers (via common author’s hash). only the brokers of the authors that pin a repo for outeroverlay exposure, will be able to correlate. it also is a different hash than the InboxId, and the OuterOverlayId, which is good to prevent correlation when the RepoId is used as author (for Repository, RootBranch and Branch commits)
branch: BranchId
BranchId the commit belongs to (not a ref, as readers do not need to access the branch definition)
perms: Vec<ObjectId>
optional list of dependencies on some commits in the root branch that contain the write permission needed for this commit
header_keys: Option<CommitHeaderKeys>
Keys to be able to open all the references (deps, acks, files, etc…)
quorum: QuorumType
This commit can only be accepted if signed by this quorum
timestamp: Timestamp
§metadata: Vec<u8>
App-specific metadata (commit message?)
body: ObjectRef
reference to an Object with a CommitBody inside. When the commit is reverted or erased (after compaction/snapshot), the CommitBody is deleted, creating a dangling reference
Trait Implementations§
Source§impl Clone for CommitContentV0
impl Clone for CommitContentV0
Source§fn clone(&self) -> CommitContentV0
fn clone(&self) -> CommitContentV0
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CommitContentV0
impl Debug for CommitContentV0
Source§impl<'de> Deserialize<'de> for CommitContentV0
impl<'de> Deserialize<'de> for CommitContentV0
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
Source§impl PartialEq for CommitContentV0
impl PartialEq for CommitContentV0
Source§impl Serialize for CommitContentV0
impl Serialize for CommitContentV0
impl Eq for CommitContentV0
impl StructuralPartialEq for CommitContentV0
Auto Trait Implementations§
impl Freeze for CommitContentV0
impl RefUnwindSafe for CommitContentV0
impl Send for CommitContentV0
impl Sync for CommitContentV0
impl Unpin for CommitContentV0
impl UnwindSafe for CommitContentV0
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