[][src]Trait act_zero::utils::UpcastFrom

pub unsafe trait UpcastFrom<T: ?Sized> {
    fn upcast(this: Arc<T>) -> Arc<Self>;
fn upcast_weak(this: Weak<T>) -> Weak<Self>; }

Helper trait to support upcasting from a concrete actor type to an actor trait object. (see Addr::upcast and WeakAddr::upcast). This is automatically implemented by the #[act_zero] macro.

Safety: implementors must not extract T from the Arc or Weak passed in.

Required methods

fn upcast(this: Arc<T>) -> Arc<Self>

Upcast an Arc<T>

fn upcast_weak(this: Weak<T>) -> Weak<Self>

Upcast a Weak<T>

Loading content...

Implementors

Loading content...