Skip to main content

AuditEvent

Enum AuditEvent 

Source
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

§goal: String

The goal string being resolved (e.g. "parent(X, alice)").

§session_id: String

Session identifier that scopes this query.

§timestamp_ms: u64

Wall-clock time in milliseconds since UNIX epoch.

§

PeerQueried

A remote peer was contacted to help resolve the goal.

Fields

§peer_id: String

Identifier of the remote peer (e.g. multiaddr or libp2p PeerId).

§goal: String

The specific sub-goal forwarded to that peer.

§timestamp_ms: u64

Wall-clock time in milliseconds since UNIX epoch.

§

RuleFired

A local or remote rule matched and produced bindings.

Fields

§rule_id: String

Stable rule identifier (e.g. "rule:parent/2#3").

§bindings: HashMap<String, String>

Variable bindings produced by this rule application.

§timestamp_ms: u64

Wall-clock time in milliseconds since UNIX epoch.

§

ResultReceived

A batch of results was received from a remote peer.

Fields

§peer_id: String

Peer that returned this batch.

§binding_count: usize

Number of variable bindings in this batch.

§is_final: bool

Whether this is the peer’s final response for the sub-goal.

§timestamp_ms: u64

Wall-clock time in milliseconds since UNIX epoch.

§

QueryCompleted

The inference session completed successfully.

Fields

§session_id: String

Session identifier.

§total_results: usize

Total number of result bindings produced across all peers.

§duration_ms: u64

Elapsed time from QueryStarted to QueryCompleted in milliseconds.

§timestamp_ms: u64

Wall-clock time in milliseconds since UNIX epoch.

§

QueryFailed

The inference session failed.

Fields

§session_id: String

Session identifier.

§reason: String

Human-readable failure reason.

§timestamp_ms: u64

Wall-clock time in milliseconds since UNIX epoch.

Implementations§

Source§

impl AuditEvent

Source

pub fn event_type(&self) -> &str

Returns a stable, lowercase string tag for this event variant.

Useful for serialization, metrics labeling, and log filtering.

Source

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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for AuditEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more