Skip to main content

ActionTrait

Trait ActionTrait 

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

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

Required Methods§

Source

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

Provided Methods§

Source

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

Implementations§

Source§

impl dyn ActionTrait

Source

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

Source

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

Source

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

Trait Implementations§

Source§

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

Source§

fn cast(&self) -> T

Source§

impl<T: ActionTrait + ActionDefaultRef> 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

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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