pub trait Slots<F: Flight> {
type Index: Copy;
type Capacity: Copy;
type Physical: Copy + Eq;
type Outbound: Copy + Into<Self::Physical>;
type Creation: AsRef<Self::Outbound>;
type Accepted: TryFrom<(Self::Index, Self::Capacity), Error = (Self::Index, Self::Capacity)>;
type Reclaimed;
type Retirement: Queue<Slot = Self::Physical>;
// Required methods
fn accept_cap(&self) -> Self::Capacity;
fn creation(&self, target: F::Target<Socket>) -> Option<Self::Creation>;
fn fail_create(&self, creation: Self::Creation);
fn created(
&self,
creation: Self::Creation,
) -> Result<F::Created, F::SocketFailure>;
fn accepted(
&self,
accepted: Self::Accepted,
) -> Result<F::Descriptor, F::AcceptFailure>;
fn abandon(&self, accepted: Self::Accepted) -> Self::Reclaimed;
fn reclaim(&self, creation: Self::Creation);
fn retirement(&self) -> Self::Retirement;
}Expand description
Descriptor admission and retirement remain in their original domain.
Required Associated Types§
type Index: Copy
type Capacity: Copy
type Physical: Copy + Eq
type Outbound: Copy + Into<Self::Physical>
type Creation: AsRef<Self::Outbound>
type Accepted: TryFrom<(Self::Index, Self::Capacity), Error = (Self::Index, Self::Capacity)>
type Reclaimed
type Retirement: Queue<Slot = Self::Physical>
Required Methods§
fn accept_cap(&self) -> Self::Capacity
fn creation(&self, target: F::Target<Socket>) -> Option<Self::Creation>
fn fail_create(&self, creation: Self::Creation)
fn created( &self, creation: Self::Creation, ) -> Result<F::Created, F::SocketFailure>
fn accepted( &self, accepted: Self::Accepted, ) -> Result<F::Descriptor, F::AcceptFailure>
fn abandon(&self, accepted: Self::Accepted) -> Self::Reclaimed
fn reclaim(&self, creation: Self::Creation)
fn retirement(&self) -> Self::Retirement
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".