UseOnDrop

Trait UseOnDrop 

Source
pub trait UseOnDrop: Sealed {
    // Required method
    fn use_on_drop<F>(&mut self, f: F)
       where F: FnMut() + Send + 'static;
}
Expand description

在组件销毁时执行回调。注意不要在回调中使用State。

Required Methods§

Source

fn use_on_drop<F>(&mut self, f: F)
where F: FnMut() + Send + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl UseOnDrop for Hooks<'_, '_>