pub struct HeddleNote {
pub state_id: String,
pub change_id: String,
pub source_state: Option<State>,
pub parents_rewritten: bool,
pub agent: Option<Agent>,
pub confidence: Option<f32>,
pub status: String,
pub omitted_annotations_breakdown: Option<OmittedBreakdown>,
pub signal_counts: Option<SignalCounts>,
pub attribution: Option<NoteAttribution>,
}Expand description
Portable Heddle metadata attached to a projected Git commit.
Fields§
§state_id: String§change_id: String§source_state: Option<State>Hex-encoded canonical MessagePack. Absent or null when the note has no
embedded state. A JSON object is the retired inline State and is
rejected so serde_json never monomorphizes State’s deserializer.
parents_rewritten: boolWhether Git projection changed the parent graph represented by the embedded source state.
agent: Option<Agent>§confidence: Option<f32>§status: StringEither draft or published.
omitted_annotations_breakdown: Option<OmittedBreakdown>Per-scope counts of annotations omitted from a Git export.
signal_counts: Option<SignalCounts>Per-module risk-signal counts observed at export time.
attribution: Option<NoteAttribution>Author and agent attribution not representable by a Git signature.
Implementations§
Source§impl HeddleNote
impl HeddleNote
Sourcepub fn from_state(state: &State) -> HeddleNote
pub fn from_state(state: &State) -> HeddleNote
Construct the canonical note for a state projected without rewriting its parent graph.
Sourcepub fn from_projected_state(state: &State) -> HeddleNote
pub fn from_projected_state(state: &State) -> HeddleNote
Construct a note for a Git projection whose parent graph differs from the embedded source state.
pub fn with_omitted_breakdown(self, breakdown: OmittedBreakdown) -> HeddleNote
pub fn with_signal_counts(self, counts: SignalCounts) -> HeddleNote
pub fn with_attribution(self, attribution: NoteAttribution) -> HeddleNote
Sourcepub fn to_json_bytes(&self) -> Result<Vec<u8>, Error>
pub fn to_json_bytes(&self) -> Result<Vec<u8>, Error>
Encode the one canonical JSON representation written to Git notes.
Sourcepub fn from_json_bytes(bytes: &[u8]) -> Result<HeddleNote, Error>
pub fn from_json_bytes(bytes: &[u8]) -> Result<HeddleNote, Error>
Decode the canonical Git-note representation.
Trait Implementations§
Source§impl Clone for HeddleNote
impl Clone for HeddleNote
Source§fn clone(&self) -> HeddleNote
fn clone(&self) -> HeddleNote
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more