pub struct AuditContext {
pub exec: Option<AuditExecContext>,
pub cellos: Option<AuditCellosContext>,
pub clipboard: Option<AuditClipboardContext>,
pub reveal: Option<AuditRevealContext>,
pub mcp: Option<AuditMcpContext>,
}Expand description
Optional structured context for an audit entry.
This keeps the local audit log compatible with older entries while giving higher layers a place to attach non-plaintext execution metadata such as the chosen authority contract, target, and projected secret set.
Fields§
§exec: Option<AuditExecContext>§cellos: Option<AuditCellosContext>§clipboard: Option<AuditClipboardContext>§reveal: Option<AuditRevealContext>§mcp: Option<AuditMcpContext>Implementations§
Source§impl AuditContext
impl AuditContext
pub fn from_exec(exec: AuditExecContext) -> Self
pub fn from_cellos(cellos: AuditCellosContext) -> Self
pub fn from_clipboard(clipboard: AuditClipboardContext) -> Self
pub fn from_reveal(reveal: AuditRevealContext) -> Self
Sourcepub fn from_mcp(mcp: AuditMcpContext) -> Self
pub fn from_mcp(mcp: AuditMcpContext) -> Self
Build a context that carries only the MCP-server payload.
Used by tsafe-mcp per ADR-006 §6.1 to attach host, pid, tool, and
optional tsafe_run execution metadata to every audit entry without
touching the other context variants.
Trait Implementations§
Source§impl Clone for AuditContext
impl Clone for AuditContext
Source§fn clone(&self) -> AuditContext
fn clone(&self) -> AuditContext
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 AuditContext
impl Debug for AuditContext
Source§impl Default for AuditContext
impl Default for AuditContext
Source§fn default() -> AuditContext
fn default() -> AuditContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AuditContext
impl<'de> Deserialize<'de> for AuditContext
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 AuditContext
impl PartialEq for AuditContext
Source§fn eq(&self, other: &AuditContext) -> bool
fn eq(&self, other: &AuditContext) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AuditContext
impl Serialize for AuditContext
impl Eq for AuditContext
impl StructuralPartialEq for AuditContext
Auto Trait Implementations§
impl Freeze for AuditContext
impl RefUnwindSafe for AuditContext
impl Send for AuditContext
impl Sync for AuditContext
impl Unpin for AuditContext
impl UnsafeUnpin for AuditContext
impl UnwindSafe for AuditContext
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,
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.