Skip to main content

InstrumentationHub

Struct InstrumentationHub 

Source
pub struct InstrumentationHub { /* private fields */ }

Implementations§

Source§

impl InstrumentationHub

Source

pub fn target_descriptor( &self, target: &TargetHandle, ) -> Result<&TargetDescriptor, InstrumentationError>

Source

pub fn instrument_registration( &self, instrument: &InstrumentHandle, ) -> Result<&InstrumentRegistration, InstrumentationError>

Source

pub fn requested_projection( &self, target: &TargetHandle, event: EventKind, ) -> Result<ProjectionRequest, InstrumentationError>

Returns the aggregate projection required by matching subscriptions for one target/event. Producers use this before executing a safepoint so environment or frame capture is enabled only when it can be consumed.

Source

pub fn emit<A: EventAccess>( &mut self, target: &TargetHandle, event: ProducerEvent, access: &mut A, ) -> Result<DispatchReport, InstrumentationError>

Delivers one cheap producer event to every matching attachment in deterministic registration order. Projection methods are never called until an attachment has matched both target and event.

Source

pub fn drain_events( &mut self, instrument: &InstrumentHandle, ) -> Result<EventBatch, InstrumentationError>

Source

pub fn queued_event_count( &self, instrument: &InstrumentHandle, ) -> Result<usize, InstrumentationError>

Source

pub fn authorize_control( &self, lease: &ControlLease, capability: Capability, ) -> Result<(), InstrumentationError>

Source

pub fn request_directive( &mut self, lease: &ControlLease, directive: InstrumentDirective, ) -> Result<(), InstrumentationError>

Stores a controller directive for application at the next real evaluator or machine safepoint. Continue clears a pending directive.

Source

pub fn take_directive( &mut self, target: &TargetHandle, ) -> Result<InstrumentDirective, InstrumentationError>

Source§

impl InstrumentationHub

Source

pub fn new() -> Self

Source

pub const fn enabled_events(&self) -> EventMask

Source

pub fn registration_count(&self) -> usize

Source

pub fn target_count(&self) -> usize

Source

pub fn attachment_count(&self) -> usize

Source

pub fn registrations( &self, ) -> impl Iterator<Item = (&InstrumentHandle, &InstrumentRegistration)>

Source

pub fn register( &mut self, registration: InstrumentRegistration, ) -> Result<InstrumentHandle, InstrumentationError>

Source

pub fn register_target( &mut self, descriptor: TargetDescriptor, ) -> Result<TargetHandle, InstrumentationError>

Source

pub fn attach( &mut self, instrument: &InstrumentHandle, target: &TargetHandle, ) -> Result<InstrumentationAttachment, InstrumentationError>

Source

pub fn attachments_for_target( &self, target: &TargetHandle, ) -> Result<Vec<&InstrumentationAttachment>, InstrumentationError>

Source

pub fn enabled_for_target( &self, target: &TargetHandle, event: EventKind, ) -> Result<bool, InstrumentationError>

Source

pub fn acquire_control( &mut self, instrument: &InstrumentHandle, target: &TargetHandle, ) -> Result<ControlLease, InstrumentationError>

Source

pub fn release_control( &mut self, lease: &ControlLease, ) -> Result<(), InstrumentationError>

Source

pub fn detach( &mut self, instrument: &InstrumentHandle, ) -> Result<(), InstrumentationError>

Source

pub fn remove_target( &mut self, target: &TargetHandle, ) -> Result<(), InstrumentationError>

Source

pub fn detach_session(&mut self, session_id: &str) -> SessionCleanup

Source

pub fn clear(&mut self)

Trait Implementations§

Source§

impl Debug for InstrumentationHub

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for InstrumentationHub

Source§

fn default() -> InstrumentationHub

Returns the “default value” for a type. Read more

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<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> 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> 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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more