Struct gix::interrupt::Deregister
source · pub struct Deregister { /* private fields */ }
Available on crate feature
interrupt
only.Expand description
A type to help deregistering hooks registered with init_handler
;
Implementations§
source§impl Deregister
impl Deregister
sourcepub fn deregister(self) -> Result<()>
pub fn deregister(self) -> Result<()>
Remove all previously registered handlers, and assure the default behaviour is reinstated, if this is the last available instance.
Note that only the instantiation of the default behaviour can fail.
sourcepub fn with_reset(self, toggle: bool) -> Self
pub fn with_reset(self, toggle: bool) -> Self
If called with toggle
being true
, when actually deregistering, we will also reset the trigger by
calling reset()
.
sourcepub fn auto_deregister(self) -> AutoDeregister
pub fn auto_deregister(self) -> AutoDeregister
Return a type that deregisters all installed signal handlers on drop.
Trait Implementations§
source§impl Default for Deregister
impl Default for Deregister
source§fn default() -> Deregister
fn default() -> Deregister
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Deregister
impl RefUnwindSafe for Deregister
impl Send for Deregister
impl Sync for Deregister
impl Unpin for Deregister
impl UnwindSafe for Deregister
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