Trait ActionTrait

Source
pub trait ActionTrait: 'static {
    // Required method
    fn debug_fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>;

    // Provided method
    fn ref_cast_type_id(&self) -> TypeId
       where Self: 'static { ... }
}

Required Methods§

Source

fn debug_fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Provided Methods§

Source

fn ref_cast_type_id(&self) -> TypeId
where Self: 'static,

Implementations§

Source§

impl dyn ActionTrait

Source

pub fn is<T>(&self) -> bool
where T: ActionTrait + 'static,

Source

pub fn downcast_ref<T>(&self) -> Option<&T>
where T: ActionTrait + 'static,

Source

pub fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: ActionTrait + 'static,

Trait Implementations§

Source§

impl<T> ActionCast<T> for Box<dyn ActionTrait>
where T: ActionTrait + Default + Clone,

Source§

fn cast(&self) -> T

Source§

impl<T> ActionCastRef<T> for Box<dyn ActionTrait>

Source§

fn cast_ref(&self) -> &T

Source§

impl Debug for dyn ActionTrait

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Implementors§

Source§

impl<T> ActionTrait for T
where T: 'static + Debug + ?Sized,