pub struct Envelope {
pub schema_version: u32,
pub producer: String,
pub producer_model_family: String,
pub staged_at: Timestamp,
pub batch_id: Option<String>,
}Expand description
Change-set-wide producer identity and stage-time provenance.
See crates/khive-changeset/docs/api/envelope.md for commit-trailer behavior.
Fields§
§schema_version: u32NDJSON-delta format version this envelope was staged under.
producer: StringOpaque producer identity token (interactive agent id, pipeline name, …).
producer_model_family: StringOpaque producer model family token, read by the cross-family review gate.
staged_at: TimestampWall-clock time the change-set was staged, supplied by the caller.
batch_id: Option<String>Optional producer batch ID used verbatim for commit provenance; absent values let the committer derive a deterministic producer/time fallback.
Implementations§
Source§impl Envelope
impl Envelope
Sourcepub fn new(
producer: impl Into<String>,
producer_model_family: impl Into<String>,
staged_at: Timestamp,
) -> Self
pub fn new( producer: impl Into<String>, producer_model_family: impl Into<String>, staged_at: Timestamp, ) -> Self
Constructs an envelope at CURRENT_SCHEMA_VERSION with no batch ID.
Sourcepub fn with_batch_id(self, batch_id: impl Into<String>) -> Self
pub fn with_batch_id(self, batch_id: impl Into<String>) -> Self
Attaches an opaque producer-assigned batch identifier.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Envelope
impl<'de> Deserialize<'de> for Envelope
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 StructuralPartialEq for Envelope
Auto Trait Implementations§
impl Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnsafeUnpin for Envelope
impl UnwindSafe for Envelope
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