pub struct InstrumentAnyHandle(/* private fields */);Expand description
Boundary-owned wrapper that lets InstrumentAny cross the cdylib
FFI boundary by reference.
The host constructs an instance, hands a
*const InstrumentAnyHandle to the plug-in for the duration of the
callback, and drops the handle when the call returns. The plug-in
only borrows the handle and never owns it.
Implementations§
Source§impl InstrumentAnyHandle
impl InstrumentAnyHandle
Sourcepub fn new(instrument: InstrumentAny) -> Self
pub fn new(instrument: InstrumentAny) -> Self
Wraps instrument in a boundary-owned handle.
Sourcepub fn instrument(&self) -> &InstrumentAny
pub fn instrument(&self) -> &InstrumentAny
Returns a reference to the wrapped instrument.
Sourcepub fn into_inner(self) -> InstrumentAny
pub fn into_inner(self) -> InstrumentAny
Consumes the wrapper and returns the inner instrument.
Methods from Deref<Target = InstrumentAny>§
Trait Implementations§
Source§impl Clone for InstrumentAnyHandle
impl Clone for InstrumentAnyHandle
Source§fn clone(&self) -> InstrumentAnyHandle
fn clone(&self) -> InstrumentAnyHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstrumentAnyHandle
impl Debug for InstrumentAnyHandle
Auto Trait Implementations§
impl Freeze for InstrumentAnyHandle
impl RefUnwindSafe for InstrumentAnyHandle
impl Send for InstrumentAnyHandle
impl Sync for InstrumentAnyHandle
impl Unpin for InstrumentAnyHandle
impl UnsafeUnpin for InstrumentAnyHandle
impl UnwindSafe for InstrumentAnyHandle
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