pub trait InstanceServerHandler<___T = Channel>where
___T: Transport,{
// Required method
fn add_line(
&mut self,
request: Request<AddLine, ___T>,
responder: Responder<AddLine, ___T>,
) -> impl Future<Output = ()> + Send;
// Provided method
fn on_unknown_interaction(
&mut self,
ordinal: u64,
) -> impl Future<Output = ()> + Send { ... }
}Expand description
A server handler for the Instance protocol.
See Instance for more details.
Required Methods§
Sourcefn add_line(
&mut self,
request: Request<AddLine, ___T>,
responder: Responder<AddLine, ___T>,
) -> impl Future<Output = ()> + Send
fn add_line( &mut self, request: Request<AddLine, ___T>, responder: Responder<AddLine, ___T>, ) -> impl Future<Output = ()> + Send
Add a line to the canvas.
This method can be considered an improvement over the one-way case from a flow control perspective, as it is now much more difficult for a well-behaved client to “get ahead” of the server and overwhelm. This is because the client now waits for each request to be acked by the server before proceeding. This change represents a trade-off: we get much greater synchronization of message flow between the client and the server, at the cost of worse performance at the limit due to the extra wait imposed by each ack.
Provided Methods§
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.