pub trait ScalarEventSubscriptionHandler<M>where
Self: Server,
M: ScalarSubscription,{
// Required method
fn handle(
&mut self,
msg: M,
subscriber: ScalarEventSubscriber<M::Event>,
context: &mut ServerContext<Self>,
) -> Result<(), M::Error>;
}Expand description
A ScalarSubscription handler.
Required Methods§
Sourcefn handle(
&mut self,
msg: M,
subscriber: ScalarEventSubscriber<M::Event>,
context: &mut ServerContext<Self>,
) -> Result<(), M::Error>
fn handle( &mut self, msg: M, subscriber: ScalarEventSubscriber<M::Event>, context: &mut ServerContext<Self>, ) -> Result<(), M::Error>
Handle the subscription.
The subscriber parameter can be used to store the subscriber info and send events to them
later. Once their subscription is not used, the object can be dropped.
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.