Skip to main content

DiagSink

Struct DiagSink 

Source
pub struct DiagSink {
    pub published: u32,
    pub failed: u32,
    /* private fields */
}
Expand description

One executor’s /diagnostics reporter: the publisher and two counters.

No rate-limit state: the rules are windowed and fire on transitions, so the reporter is built per call with no interval (and this struct’s size, which nros-build-helpers adds to CPP_EXECUTOR_OPAQUE_U64S, stays the publisher plus two words).

Fields§

§published: u32

Reports published.

§failed: u32

Reports that could not be (serialise or publish failed).

Implementations§

Source§

impl DiagSink

Source

pub fn create( executor: &mut Executor<'_>, domain_id: u32, ) -> Result<Self, TransportError>

Create a /diagnostics publisher on executor’s session, in domain_id (the executor’s own for a Rust entry; the C++ context keeps its domain beside the executor).

Source

pub unsafe fn hook(&mut self, executor: &mut Executor<'_>)

Point executor’s violation sink at this reporter.

§Safety

self must not move, and must outlive every spin of executor, until the sink is removed (set_violation_sink(None)) or the executor is dropped — the executor keeps its address.

Auto Trait Implementations§

Blanket Implementations§

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.