pub struct Registration {
pub target: WeakKey,
pub held_value: Value,
pub token: Option<Value>,
}Expand description
One FinalizationRegistry.register call.
token is compared with SameValue, not SameValueZero, which is why it is kept as
the original Value rather than normalised into a key.
Fields§
§target: WeakKeyThe handle whose death fires the callback.
held_value: ValueWhat the callback receives: the script’s held value, kept alive until it fires.
token: Option<Value>The cancellation token, if one was given.
Auto Trait Implementations§
impl !RefUnwindSafe for Registration
impl !Send for Registration
impl !Sync for Registration
impl !UnwindSafe for Registration
impl Forget for Registration
impl Freeze for Registration
impl Move for Registration
impl Unpin for Registration
impl UnsafeUnpin for Registration
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