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§
fn use_on_drop<F>(&mut self, f: F)
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.