Trait fyrox::gui::message::MessageData

source ·
pub trait MessageData: 'static + Debug + Any + Send {
    // Required methods
    fn as_any(&self) -> &(dyn Any + 'static);
    fn compare(&self, other: &(dyn MessageData + 'static)) -> bool;
    fn clone_box(&self) -> Box<dyn MessageData>;
}
Expand description

A trait, that is used by every messages used in the user interface. It contains utility methods, that are used for downcasting and equality comparison.

Required Methods§

source

fn as_any(&self) -> &(dyn Any + 'static)

Casts self as Any reference.

source

fn compare(&self, other: &(dyn MessageData + 'static)) -> bool

Compares this message data with some other.

source

fn clone_box(&self) -> Box<dyn MessageData>

Clones self as boxed value.

Implementors§

source§

impl<T> MessageData for T
where T: 'static + Debug + PartialEq + Any + Send + Clone,