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§
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>)
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.