Struct EventRevoker
pub struct EventRevoker { /* private fields */ }Expand description
Revokes an event registration when dropped.
Returned by event-registration methods such as Click and Closed.
Use Self::into_token to manage revocation manually, or Self::forget to disable
automatic revocation without releasing the retained source interface.
Implementations§
§impl EventRevoker
impl EventRevoker
pub fn into_token(self) -> i64
pub fn into_token(self) -> i64
Returns the registration token without revoking the handler.
The caller is responsible for passing the token to the corresponding Remove* method
when the handler is no longer needed.
pub fn forget(self)
pub fn forget(self)
Disables automatic revocation without releasing the retained source interface.
Trait Implementations§
Auto Trait Implementations§
impl !Send for EventRevoker
impl !Sync for EventRevoker
impl Forget for EventRevoker
impl Freeze for EventRevoker
impl Move for EventRevoker
impl RefUnwindSafe for EventRevoker
impl Unpin for EventRevoker
impl UnsafeUnpin for EventRevoker
impl UnwindSafe for EventRevoker
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