Enum vertigo::DropResource
source · pub enum DropResource {
Fun(Option<Box<dyn FnOnce()>>),
Struct(Box<dyn Any>),
}
Expand description
A struct used by driver to tidy things up on javascript side after a rust object goes out of scope.
Variants§
Implementations§
source§impl DropResource
impl DropResource
pub fn new<F: FnOnce() + 'static>(drop_fun: F) -> DropResource
pub fn from_struct(inst: impl Any) -> DropResource
pub fn off(self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DropResource
impl !RefUnwindSafe for DropResource
impl !Send for DropResource
impl !Sync for DropResource
impl Unpin for DropResource
impl !UnwindSafe for DropResource
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