Component

Trait Component 

Source
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§

Source

fn new(rt: Weak<Runtime<'a, ()>>) -> Self

Source

fn get_rt(&self) -> Weak<Runtime<'a, ()>>

Source

fn update(self: &Rc<Self>)

Provided Methods§

Source

fn spawn<Fut>(&self, fut: Fut) -> Cancellable
where Fut: Future<Output = ()> + 'a,

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§