pub struct ScientificDiffPack {
pub schema: String,
pub pack_id: String,
pub frontier_id: String,
pub created_at: String,
pub summary: String,
pub proposals: Vec<String>,
pub aggregate_kind: String,
pub agent_run: Option<String>,
pub parent_pack: Option<String>,
pub applied_event_id: Option<String>,
pub signature: Option<String>,
pub signer_pubkey_hex: Option<String>,
}Fields§
§schema: String§pack_id: String§frontier_id: String§created_at: String§summary: String§proposals: Vec<String>§aggregate_kind: String§agent_run: Option<String>§parent_pack: Option<String>§applied_event_id: Option<String>§signature: Option<String>§signer_pubkey_hex: Option<String>Implementations§
Source§impl ScientificDiffPack
impl ScientificDiffPack
Sourcepub fn build(draft: PackDraft) -> Result<Self, String>
pub fn build(draft: PackDraft) -> Result<Self, String>
Build an unsigned pack from a draft. The pack_id is
content-addressed over canonical bytes; signing is a
separate step via sign.
Sourcepub fn sign(&mut self, key: &SigningKey)
pub fn sign(&mut self, key: &SigningKey)
Sign the pack with an Ed25519 key. Sets signature and
signer_pubkey_hex; does NOT change pack_id (the pack
is content-addressed over its body, not its signature).
Sourcepub fn verify(&self) -> Result<(), String>
pub fn verify(&self) -> Result<(), String>
Verify: pack_id matches re-derivation; if a signature is present, it verifies under the declared pubkey.
pub fn review_summary(&self, repo_path: &Path) -> DiffPackReviewSummary
Trait Implementations§
Source§impl Clone for ScientificDiffPack
impl Clone for ScientificDiffPack
Source§fn clone(&self) -> ScientificDiffPack
fn clone(&self) -> ScientificDiffPack
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 ScientificDiffPack
impl Debug for ScientificDiffPack
Source§impl<'de> Deserialize<'de> for ScientificDiffPack
impl<'de> Deserialize<'de> for ScientificDiffPack
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 Eq for ScientificDiffPack
Source§impl PartialEq for ScientificDiffPack
impl PartialEq for ScientificDiffPack
Source§impl Serialize for ScientificDiffPack
impl Serialize for ScientificDiffPack
impl StructuralPartialEq for ScientificDiffPack
Auto Trait Implementations§
impl Freeze for ScientificDiffPack
impl RefUnwindSafe for ScientificDiffPack
impl Send for ScientificDiffPack
impl Sync for ScientificDiffPack
impl Unpin for ScientificDiffPack
impl UnsafeUnpin for ScientificDiffPack
impl UnwindSafe for ScientificDiffPack
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.