pub enum AuditEvent {
QueryStarted {
goal: String,
session_id: String,
timestamp_ms: u64,
},
PeerQueried {
peer_id: String,
goal: String,
timestamp_ms: u64,
},
RuleFired {
rule_id: String,
bindings: HashMap<String, String>,
timestamp_ms: u64,
},
ResultReceived {
peer_id: String,
binding_count: usize,
is_final: bool,
timestamp_ms: u64,
},
QueryCompleted {
session_id: String,
total_results: usize,
duration_ms: u64,
timestamp_ms: u64,
},
QueryFailed {
session_id: String,
reason: String,
timestamp_ms: u64,
},
}Expand description
A single observable event in the lifetime of a distributed inference query.
Variants§
QueryStarted
The inference session was initiated for the given goal.
Fields
PeerQueried
A remote peer was contacted to help resolve the goal.
Fields
RuleFired
A local or remote rule matched and produced bindings.
Fields
ResultReceived
A batch of results was received from a remote peer.
Fields
QueryCompleted
The inference session completed successfully.
Fields
QueryFailed
The inference session failed.
Implementations§
Source§impl AuditEvent
impl AuditEvent
Sourcepub fn event_type(&self) -> &str
pub fn event_type(&self) -> &str
Returns a stable, lowercase string tag for this event variant.
Useful for serialization, metrics labeling, and log filtering.
Sourcepub fn timestamp_ms(&self) -> u64
pub fn timestamp_ms(&self) -> u64
Returns the wall-clock timestamp (ms since UNIX epoch) carried by this event.
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 moreAuto 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§
impl<T> Allocation for T
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more