pub struct Commit {
pub tree: ObjectHash,
pub parents: Vec<ObjectHash>,
pub author: String,
pub committer: String,
pub timestamp: i64,
pub message: String,
pub pq_signature: Option<PQSignature>,
pub metadata: Option<Value>,
pub timezone: Option<String>,
}Expand description
Commit - represents a snapshot in history with quantum-resistant signatures
Fields§
§tree: ObjectHash§parents: Vec<ObjectHash>§committer: String§timestamp: i64§message: String§pq_signature: Option<PQSignature>Optional post-quantum signature (ML-DSA/Dilithium) Provides quantum-resistant verification of commit authenticity
metadata: Option<Value>Optional metadata (agent annotations, tool context, etc.)
timezone: Option<String>Original Git timezone offset (e.g. -0700) for a commit imported from
Git, so re-exporting it reproduces the same Git hash. Commits Lit
creates itself record UTC and leave this unset — and because the field
is skipped when absent, their serialization is unchanged.
Implementations§
Source§impl Commit
impl Commit
pub fn new( tree: ObjectHash, parents: Vec<ObjectHash>, author: String, message: String, ) -> Self
Sourcepub fn verify_signature(&self) -> Result<(), String>
pub fn verify_signature(&self) -> Result<(), String>
Verify post-quantum signature
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Commit
impl<'de> Deserialize<'de> for Commit
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 Commit
impl RefUnwindSafe for Commit
impl Send for Commit
impl Sync for Commit
impl Unpin for Commit
impl UnsafeUnpin for Commit
impl UnwindSafe for Commit
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