pub trait Accepted: Machine {
type Seed: Clone;
type Socket: StreamSocket;
// Required method
fn accepted(
sock: Self::Socket,
seed: <Self as Accepted>::Seed,
scope: &mut Scope<'_, Self::Context>,
) -> Response<Self, Void>;
}
Expand description
Trait which must be implemented for a state machine to accept connection
This basically provides alternative constructor for the state machine.
Required Associated Types§
Required 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.