pub struct HeddleNote {
pub state_id: String,
pub change_id: String,
pub source_state: Option<State>,
pub parents_rewritten: bool,
pub agent: Option<NoteAgent>,
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>§parents_rewritten: boolWhether Git projection changed the parent graph represented by the embedded source state.
agent: Option<NoteAgent>§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) -> Self
pub fn from_state(state: &State) -> Self
Construct the canonical note for a state projected without rewriting its parent graph.
Sourcepub fn from_projected_state(state: &State) -> Self
pub fn from_projected_state(state: &State) -> Self
Construct a note for a Git projection whose parent graph differs from the embedded source state.
pub fn with_omitted_breakdown(self, breakdown: OmittedBreakdown) -> Self
pub fn with_signal_counts(self, counts: SignalCounts) -> Self
pub fn with_attribution(self, attribution: NoteAttribution) -> Self
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<Self, Error>
pub fn from_json_bytes(bytes: &[u8]) -> Result<Self, 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
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 HeddleNote
impl Debug for HeddleNote
Source§impl<'de> Deserialize<'de> for HeddleNote
impl<'de> Deserialize<'de> for HeddleNote
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 HeddleNote
impl PartialEq for HeddleNote
Source§impl Serialize for HeddleNote
impl Serialize for HeddleNote
impl StructuralPartialEq for HeddleNote
Auto Trait Implementations§
impl Freeze for HeddleNote
impl RefUnwindSafe for HeddleNote
impl Send for HeddleNote
impl Sync for HeddleNote
impl Unpin for HeddleNote
impl UnsafeUnpin for HeddleNote
impl UnwindSafe for HeddleNote
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