pub enum Accept<M, A: TryAccept + Sized>{
Server(A, <M as Accepted>::Seed),
Connection(M),
}
Expand description
Socket acceptor State Machine
TODO(tailhook) Currently this panics when there is no slab space when accepting a connection. This may be fixed by sleeping and retrying
Variants§
Implementations§
Trait Implementations§
Source§impl<M, A> Machine for Accept<M, A>
impl<M, A> Machine for Accept<M, A>
Source§type Seed = (<A as TryAccept>::Output, <M as Accepted>::Seed)
type Seed = (<A as TryAccept>::Output, <M as Accepted>::Seed)
Seed is piece of data that is needed to initialize the machine Read more
Source§fn create(
(sock, seed): Self::Seed,
scope: &mut Scope<'_, Self::Context>,
) -> Response<Self, Void>
fn create( (sock, seed): Self::Seed, scope: &mut Scope<'_, Self::Context>, ) -> Response<Self, Void>
Create a machine from some data Read more
Source§fn ready(
self,
events: EventSet,
scope: &mut Scope<'_, Self::Context>,
) -> Response<Self, Self::Seed>
fn ready( self, events: EventSet, scope: &mut Scope<'_, Self::Context>, ) -> Response<Self, Self::Seed>
Socket readiness notification
Source§fn spawned(
self,
_scope: &mut Scope<'_, Self::Context>,
) -> Response<Self, Self::Seed>
fn spawned( self, _scope: &mut Scope<'_, Self::Context>, ) -> Response<Self, Self::Seed>
Called after spawn event Read more
Source§fn timeout(
self,
scope: &mut Scope<'_, Self::Context>,
) -> Response<Self, Self::Seed>
fn timeout( self, scope: &mut Scope<'_, Self::Context>, ) -> Response<Self, Self::Seed>
Timeout happened
Source§fn wakeup(
self,
scope: &mut Scope<'_, Self::Context>,
) -> Response<Self, Self::Seed>
fn wakeup( self, scope: &mut Scope<'_, Self::Context>, ) -> Response<Self, Self::Seed>
Message received Read more
Source§fn spawn_error(
self,
_scope: &mut Scope<'_, Self::Context>,
error: SpawnError<Self::Seed>,
) -> Response<Self, Self::Seed>
fn spawn_error( self, _scope: &mut Scope<'_, Self::Context>, error: SpawnError<Self::Seed>, ) -> Response<Self, Self::Seed>
Called instead of spawned, if there is no slab space Read more
Auto Trait Implementations§
impl<M, A> Freeze for Accept<M, A>
impl<M, A> RefUnwindSafe for Accept<M, A>where
<A as TryAccept>::Output: Sized,
A: RefUnwindSafe,
<M as Accepted>::Seed: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, A> Send for Accept<M, A>
impl<M, A> Sync for Accept<M, A>
impl<M, A> Unpin for Accept<M, A>
impl<M, A> UnwindSafe for Accept<M, A>where
<A as TryAccept>::Output: Sized,
A: UnwindSafe,
<M as Accepted>::Seed: UnwindSafe,
M: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more