pub struct CompensationHandle { /* private fields */ }Expand description
Bus-insertable compensation hook handle used by runtime execution hooks.
Implementations§
Source§impl CompensationHandle
impl CompensationHandle
Sourcepub fn from_hook<H>(hook: H) -> Selfwhere
H: CompensationHook + 'static,
pub fn from_hook<H>(hook: H) -> Selfwhere
H: CompensationHook + 'static,
Create a handle from a concrete compensation hook implementation.
Sourcepub fn from_arc(hook: Arc<dyn CompensationHook>) -> Self
pub fn from_arc(hook: Arc<dyn CompensationHook>) -> Self
Create a handle from an existing trait-object Arc.
Sourcepub fn hook(&self) -> Arc<dyn CompensationHook>
pub fn hook(&self) -> Arc<dyn CompensationHook>
Access the shared compensation hook.
Trait Implementations§
Source§impl Clone for CompensationHandle
impl Clone for CompensationHandle
Source§fn clone(&self) -> CompensationHandle
fn clone(&self) -> CompensationHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompensationHandle
impl !RefUnwindSafe for CompensationHandle
impl Send for CompensationHandle
impl Sync for CompensationHandle
impl Unpin for CompensationHandle
impl UnsafeUnpin for CompensationHandle
impl !UnwindSafe for CompensationHandle
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