Message

Trait Message 

Source
pub trait Message: Sized {
    type Data;

    // Required methods
    fn new(source_id: usize, component: ComponentName, data: Self::Data) -> Self;
    fn source_id(&self) -> usize;
    fn component(&self) -> ComponentName;
    fn data(&self) -> &Self::Data;
    fn unregister_source(
        global: &mut GlobalData,
        input_source: &InputSource<Self>,
    );
}

Required Associated Types§

Required Methods§

Source

fn new(source_id: usize, component: ComponentName, data: Self::Data) -> Self

Source

fn source_id(&self) -> usize

Source

fn component(&self) -> ComponentName

Source

fn data(&self) -> &Self::Data

Source

fn unregister_source(global: &mut GlobalData, input_source: &InputSource<Self>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§