pub struct VoidBlockHook {
pub state: &'static AtomicBool,
/* private fields */
}Expand description
A hook that conditionally blocks a void method. Created by
Method::hook_void_block.
Fields§
§state: &'static AtomicBoolThe flag that controls whether the method is blocked.
Implementations§
Source§impl VoidBlockHook
impl VoidBlockHook
Sourcepub fn set_blocked(&self, blocked: bool)
pub fn set_blocked(&self, blocked: bool)
When true, calls to the hooked method return immediately.
pub fn is_blocked(&self) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for VoidBlockHook
impl !Send for VoidBlockHook
impl !Sync for VoidBlockHook
impl !UnwindSafe for VoidBlockHook
impl Forget for VoidBlockHook
impl Freeze for VoidBlockHook
impl Move for VoidBlockHook
impl Unpin for VoidBlockHook
impl UnsafeUnpin for VoidBlockHook
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