pub struct AuditEvent {
pub tenant_id: String,
pub subject_id: String,
pub session_id: String,
pub sequence: u64,
pub timestamp: u64,
pub kind: AuditEventKind,
pub media_type: String,
pub body: Vec<u8>,
}Expand description
Full encrypted event content visible to the owning user and tenant administrators.
Fields§
§tenant_id: StringTenant isolation boundary.
subject_id: StringUser or service that owns the event.
session_id: StringExact session or audit stream.
sequence: u64Monotonic event number inside the stream.
timestamp: u64Event time in Unix seconds.
kind: AuditEventKindEvent category.
media_type: StringContent media type such as application/json.
body: Vec<u8>Opaque request, response, or usage payload.
Implementations§
Source§impl AuditEvent
impl AuditEvent
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Canonical plaintext encoding, intended to be passed immediately to seal_audit_event.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, AccessError>
pub fn decode(bytes: &[u8]) -> Result<Self, AccessError>
Decode and validate a canonical event under default bounds.
Sourcepub fn decode_with(
bytes: &[u8],
limits: &AccessValidationPolicy,
) -> Result<Self, AccessError>
pub fn decode_with( bytes: &[u8], limits: &AccessValidationPolicy, ) -> Result<Self, AccessError>
Decode and validate a canonical event under caller-supplied bounds.
Trait Implementations§
Source§impl Clone for AuditEvent
impl Clone for AuditEvent
Source§fn clone(&self) -> AuditEvent
fn clone(&self) -> AuditEvent
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 AuditEvent
impl Debug for AuditEvent
impl Eq for AuditEvent
Source§impl PartialEq for AuditEvent
impl PartialEq for AuditEvent
impl StructuralPartialEq for AuditEvent
Auto Trait Implementations§
impl Freeze for AuditEvent
impl RefUnwindSafe for AuditEvent
impl Send for AuditEvent
impl Sync for AuditEvent
impl Unpin for AuditEvent
impl UnsafeUnpin for AuditEvent
impl UnwindSafe for AuditEvent
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