pub struct ProposalProvenance {
pub producer: String,
pub provider: Option<String>,
pub model: Option<String>,
pub prompt_id: Option<String>,
pub prompt_version: Option<String>,
pub schema_version: Option<String>,
pub input_source_hash: Option<String>,
pub input_fact_ids: Vec<String>,
pub stale_when: Vec<String>,
pub budget_notes: Vec<String>,
}Expand description
Auditable model, prompt, and source lineage for a stored proposal.
Fields§
§producer: String§provider: Option<String>§model: Option<String>§prompt_id: Option<String>§prompt_version: Option<String>§schema_version: Option<String>§input_source_hash: Option<String>§input_fact_ids: Vec<String>§stale_when: Vec<String>§budget_notes: Vec<String>Implementations§
Source§impl ProposalProvenance
impl ProposalProvenance
Sourcepub fn new(producer: impl Into<String>) -> Self
pub fn new(producer: impl Into<String>) -> Self
Creates a minimal provenance record for deterministic or manual proposal producers.
Sourcepub fn from_json(value: &str) -> Result<Self, DomainError>
pub fn from_json(value: &str) -> Result<Self, DomainError>
Parses stored JSON while preserving legacy rows that predate provenance metadata.
Sourcepub fn validate(self) -> Result<Self, DomainError>
pub fn validate(self) -> Result<Self, DomainError>
Normalizes and validates stable provenance fields.
Trait Implementations§
Source§impl Clone for ProposalProvenance
impl Clone for ProposalProvenance
Source§fn clone(&self) -> ProposalProvenance
fn clone(&self) -> ProposalProvenance
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 ProposalProvenance
impl Debug for ProposalProvenance
Source§impl Default for ProposalProvenance
impl Default for ProposalProvenance
Source§impl<'de> Deserialize<'de> for ProposalProvenance
impl<'de> Deserialize<'de> for ProposalProvenance
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 ProposalProvenance
Source§impl PartialEq for ProposalProvenance
impl PartialEq for ProposalProvenance
Source§impl Serialize for ProposalProvenance
impl Serialize for ProposalProvenance
impl StructuralPartialEq for ProposalProvenance
Auto Trait Implementations§
impl Freeze for ProposalProvenance
impl RefUnwindSafe for ProposalProvenance
impl Send for ProposalProvenance
impl Sync for ProposalProvenance
impl Unpin for ProposalProvenance
impl UnsafeUnpin for ProposalProvenance
impl UnwindSafe for ProposalProvenance
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.