pub struct InstrumentationHub { /* private fields */ }Implementations§
Source§impl InstrumentationHub
impl InstrumentationHub
pub fn target_descriptor( &self, target: &TargetHandle, ) -> Result<&TargetDescriptor, InstrumentationError>
pub fn instrument_registration( &self, instrument: &InstrumentHandle, ) -> Result<&InstrumentRegistration, InstrumentationError>
Sourcepub fn requested_projection(
&self,
target: &TargetHandle,
event: EventKind,
) -> Result<ProjectionRequest, InstrumentationError>
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.
Sourcepub fn emit<A: EventAccess>(
&mut self,
target: &TargetHandle,
event: ProducerEvent,
access: &mut A,
) -> Result<DispatchReport, InstrumentationError>
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.
pub fn drain_events( &mut self, instrument: &InstrumentHandle, ) -> Result<EventBatch, InstrumentationError>
pub fn queued_event_count( &self, instrument: &InstrumentHandle, ) -> Result<usize, InstrumentationError>
Sourcepub fn request_directive(
&mut self,
lease: &ControlLease,
directive: InstrumentDirective,
) -> Result<(), InstrumentationError>
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.
pub fn take_directive( &mut self, target: &TargetHandle, ) -> Result<InstrumentDirective, InstrumentationError>
Source§impl InstrumentationHub
impl InstrumentationHub
pub fn new() -> Self
pub const fn enabled_events(&self) -> EventMask
pub fn registration_count(&self) -> usize
pub fn target_count(&self) -> usize
pub fn attachment_count(&self) -> usize
pub fn registrations( &self, ) -> impl Iterator<Item = (&InstrumentHandle, &InstrumentRegistration)>
pub fn register( &mut self, registration: InstrumentRegistration, ) -> Result<InstrumentHandle, InstrumentationError>
pub fn register_target( &mut self, descriptor: TargetDescriptor, ) -> Result<TargetHandle, InstrumentationError>
pub fn attach( &mut self, instrument: &InstrumentHandle, target: &TargetHandle, ) -> Result<InstrumentationAttachment, InstrumentationError>
pub fn attachments_for_target( &self, target: &TargetHandle, ) -> Result<Vec<&InstrumentationAttachment>, InstrumentationError>
pub fn enabled_for_target( &self, target: &TargetHandle, event: EventKind, ) -> Result<bool, InstrumentationError>
pub fn acquire_control( &mut self, instrument: &InstrumentHandle, target: &TargetHandle, ) -> Result<ControlLease, InstrumentationError>
pub fn release_control( &mut self, lease: &ControlLease, ) -> Result<(), InstrumentationError>
pub fn detach( &mut self, instrument: &InstrumentHandle, ) -> Result<(), InstrumentationError>
pub fn remove_target( &mut self, target: &TargetHandle, ) -> Result<(), InstrumentationError>
pub fn detach_session(&mut self, session_id: &str) -> SessionCleanup
pub fn clear(&mut self)
Trait Implementations§
Source§impl Debug for InstrumentationHub
impl Debug for InstrumentationHub
Source§impl Default for InstrumentationHub
impl Default for InstrumentationHub
Source§fn default() -> InstrumentationHub
fn default() -> InstrumentationHub
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InstrumentationHub
impl RefUnwindSafe for InstrumentationHub
impl Send for InstrumentationHub
impl Sync for InstrumentationHub
impl Unpin for InstrumentationHub
impl UnsafeUnpin for InstrumentationHub
impl UnwindSafe for InstrumentationHub
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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