pub struct NativeInstrumentation { /* private fields */ }Expand description
Embedding-only access to the instrumentation hub owned by one live Runtime.
The service retains only a weak Runtime identity. It is never a Hara value, is not installed in a namespace, and cannot keep a Runtime or Session alive.
Implementations§
Source§impl NativeInstrumentation
impl NativeInstrumentation
pub fn session_id(&self) -> &str
pub fn is_active(&self) -> bool
Sourcepub fn register(
&self,
registration: InstrumentRegistration,
) -> Result<NativeInstrumentHandle, NativeInstrumentationError>
pub fn register( &self, registration: InstrumentRegistration, ) -> Result<NativeInstrumentHandle, NativeInstrumentationError>
Registers one trusted queued instrument. Transform mode and callback binding are intentionally rejected until their later lifecycle seams are implemented; they never degrade silently to another mode or delivery.
Sourcepub fn bind_target(
&self,
target: &TargetHandle,
) -> Result<NativeTargetHandle, NativeInstrumentationError>
pub fn bind_target( &self, target: &TargetHandle, ) -> Result<NativeTargetHandle, NativeInstrumentationError>
Fences a target identity received from a trusted target-producing host seam. Target implementation objects remain private to Runtime/Session.
pub fn registration( &self, instrument: &NativeInstrumentHandle, ) -> Result<InstrumentRegistration, NativeInstrumentationError>
pub fn target_descriptor( &self, target: &NativeTargetHandle, ) -> Result<TargetDescriptor, NativeInstrumentationError>
pub fn attach( &self, instrument: &NativeInstrumentHandle, target: &NativeTargetHandle, ) -> Result<NativeAttachment, NativeInstrumentationError>
pub fn granted_capabilities( &self, instrument: &NativeInstrumentHandle, target: &NativeTargetHandle, ) -> Result<BTreeSet<Capability>, NativeInstrumentationError>
pub fn queued_event_count( &self, instrument: &NativeInstrumentHandle, ) -> Result<usize, NativeInstrumentationError>
pub fn drain_events( &self, instrument: &NativeInstrumentHandle, ) -> Result<EventBatch, NativeInstrumentationError>
pub fn detach( &self, instrument: &NativeInstrumentHandle, ) -> Result<(), NativeInstrumentationError>
pub fn acquire_control( &self, instrument: &NativeInstrumentHandle, target: &NativeTargetHandle, ) -> Result<NativeControlLease, NativeInstrumentationError>
pub fn release_control( &self, lease: &NativeControlLease, ) -> Result<(), NativeInstrumentationError>
pub fn request_directive( &self, lease: &NativeControlLease, directive: InstrumentDirective, ) -> Result<(), NativeInstrumentationError>
Source§impl NativeInstrumentation
impl NativeInstrumentation
Sourcepub fn bind_target_identity(
&self,
target_id: impl Into<String>,
generation: u64,
) -> Result<NativeTargetHandle, NativeInstrumentationError>
pub fn bind_target_identity( &self, target_id: impl Into<String>, generation: u64, ) -> Result<NativeTargetHandle, NativeInstrumentationError>
Binds one opaque target identity obtained from a trusted Session surface.
The generation is mandatory: a stale identity must not bind a replacement target that later reuses the same id. Resolution still applies the service’s Runtime and Session fences before returning an opaque native target handle.
Trait Implementations§
Source§impl Clone for NativeInstrumentation
impl Clone for NativeInstrumentation
Source§fn clone(&self) -> NativeInstrumentation
fn clone(&self) -> NativeInstrumentation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for NativeInstrumentation
impl !Send for NativeInstrumentation
impl !Sync for NativeInstrumentation
impl !UnwindSafe for NativeInstrumentation
impl Freeze for NativeInstrumentation
impl Unpin for NativeInstrumentation
impl UnsafeUnpin for NativeInstrumentation
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
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> 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> ⓘ
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> ⓘ
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