pub trait Component<'a> {
// Required methods
fn new(rt: Weak<Runtime<'a, ()>>) -> Self;
fn get_rt(&self) -> Weak<Runtime<'a, ()>>;
fn update(self: &Rc<Self>);
// Provided method
fn spawn<Fut>(&self, fut: Fut) -> Cancellable
where Fut: Future<Output = ()> + 'a { ... }
}Required Methods§
fn new(rt: Weak<Runtime<'a, ()>>) -> Self
fn get_rt(&self) -> Weak<Runtime<'a, ()>>
fn update(self: &Rc<Self>)
Provided Methods§
fn spawn<Fut>(&self, fut: Fut) -> Cancellable
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.