DynTrait

Trait DynTrait 

Source
pub unsafe trait DynTrait {
    type Plain: PlainDyn + ?Sized;
    type RemoveSend: DynTrait<Plain = Self::Plain> + ?Sized;
    type RemoveSync: DynTrait<Plain = Self::Plain> + ?Sized;
}
Expand description

A trait object that works with tinydyn, including any extra bounds.

dyn Trait erases that a trait object implements Send or Sync, so Rust allows a concrete type that implements either of those traits to cast to a dyn Trait [+ Send][+ Sync] object.

tinydyn itself doesn’t depend on Send or Sync the important code.

§Safety

The associated types must be correct as described.

Required Associated Types§

Source

type Plain: PlainDyn + ?Sized

The trait object without any extra bounds.

Source

type RemoveSend: DynTrait<Plain = Self::Plain> + ?Sized

The trait object without the + Send bound. If it has none, this must be Self.

Source

type RemoveSync: DynTrait<Plain = Self::Plain> + ?Sized

The trait object without the + Sync bound. If it has none, this must be Self.

Implementors§