Skip to main content

BaseMessageData

Trait BaseMessageData 

Source
pub trait BaseMessageData:
    'static
    + Debug
    + Any
    + Send {
    // Required methods
    fn as_any(&self) -> &(dyn Any + 'static);
    fn compare(&self, other: &(dyn BaseMessageData + '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 BaseMessageData + '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> BaseMessageData for T
where T: 'static + Debug + PartialEq + Any + Send + Clone + MessageData,