pub trait IMessageEvent: IEvent{
type Data: TryFrom<Value>;
// Provided methods
fn data(&self) -> Self::Data { ... }
fn origin(&self) -> String { ... }
fn last_event_id(&self) -> String { ... }
fn source(&self) -> Option<Reference> { ... }
fn ports(&self) -> Vec<Reference> { ... }
}
Expand description
The MessageEvent interface represents a message received by a target object.
Required Associated Types§
Provided Methods§
Sourcefn last_event_id(&self) -> String
fn last_event_id(&self) -> String
A string representing a unique ID for the event.
Sourcefn source(&self) -> Option<Reference>
fn source(&self) -> Option<Reference>
A MessageEventSource (which can be a WindowProxy, MessagePort, or ServiceWorker object) representing the message emitter.
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.