pub trait SampleServerHandler<___T: Transport = Channel> {
// Required methods
fn set(
&mut self,
request: Request<Set, ___T>,
) -> impl Future<Output = ()> + Send;
fn commit(
&mut self,
request: Request<Commit, ___T>,
responder: Responder<Commit, ___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 Sample protocol.
See Sample for more details.
Required Methods§
Sourcefn set(
&mut self,
request: Request<Set, ___T>,
) -> impl Future<Output = ()> + Send
fn set( &mut self, request: Request<Set, ___T>, ) -> impl Future<Output = ()> + Send
Add sample parameters.
Since this is limited by channel size, this API paginates at 300 items. That should fit in a channel unless a selector is particularly gigantic.
Use Commit to indicate that all samples are sent over.
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.