pub struct ContextItem {
pub schema_version: String,
pub id: Uuid,
pub kind: ContextKind,
pub content: String,
pub content_digest: String,
pub source: ContextSource,
pub scope: ContextScope,
pub observed_at: DateTime<Utc>,
pub authority: ContextAuthority,
pub secret_taint: SecretTaint,
pub attributes: Value,
}Expand description
Immutable, content-addressed context statement.
Fields§
§schema_version: StringPublic schema identifier.
id: UuidStable item identifier.
kind: ContextKindStatement category.
content: StringPublic, redacted statement body.
content_digest: StringBLAKE3 digest of the exact UTF-8 statement body.
source: ContextSourceCausal provenance.
scope: ContextScopeRetrieval boundary.
observed_at: DateTime<Utc>Source observation time.
Producer authority.
secret_taint: SecretTaintSensitive-data handling result.
attributes: ValuePublic structured attributes; never used as verification evidence by itself.
Implementations§
Source§impl ContextItem
impl ContextItem
Sourcepub fn runtime_observation(
content: impl Into<String>,
source: ContextSource,
scope: ContextScope,
observed_at: DateTime<Utc>,
authority: ContextAuthority,
secret_taint: SecretTaint,
attributes: Value,
) -> Self
pub fn runtime_observation( content: impl Into<String>, source: ContextSource, scope: ContextScope, observed_at: DateTime<Utc>, authority: ContextAuthority, secret_taint: SecretTaint, attributes: Value, ) -> Self
Creates one runtime-owned observation from a redacted evidence statement.
Sourcepub fn validate(&self) -> Result<(), ContextError>
pub fn validate(&self) -> Result<(), ContextError>
Validates public shape, digest, provenance, and scope invariants.
Trait Implementations§
Source§impl Clone for ContextItem
impl Clone for ContextItem
Source§fn clone(&self) -> ContextItem
fn clone(&self) -> ContextItem
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 ContextItem
impl Debug for ContextItem
Source§impl<'de> Deserialize<'de> for ContextItem
impl<'de> Deserialize<'de> for ContextItem
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 ContextItem
impl PartialEq for ContextItem
Source§impl Serialize for ContextItem
impl Serialize for ContextItem
impl StructuralPartialEq for ContextItem
Auto Trait Implementations§
impl Freeze for ContextItem
impl RefUnwindSafe for ContextItem
impl Send for ContextItem
impl Sync for ContextItem
impl Unpin for ContextItem
impl UnsafeUnpin for ContextItem
impl UnwindSafe for ContextItem
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