Skip to main content

Slots

Trait Slots 

Source
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§

Source

type Index: Copy

Source

type Capacity: Copy

Source

type Physical: Copy + Eq

Source

type Outbound: Copy + Into<Self::Physical>

Source

type Creation: AsRef<Self::Outbound>

Source

type Accepted: TryFrom<(Self::Index, Self::Capacity), Error = (Self::Index, Self::Capacity)>

Source

type Reclaimed

Source

type Retirement: Queue<Slot = Self::Physical>

Required Methods§

Source

fn accept_cap(&self) -> Self::Capacity

Source

fn creation(&self, target: F::Target<Socket>) -> Option<Self::Creation>

Source

fn fail_create(&self, creation: Self::Creation)

Source

fn created( &self, creation: Self::Creation, ) -> Result<F::Created, F::SocketFailure>

Source

fn accepted( &self, accepted: Self::Accepted, ) -> Result<F::Descriptor, F::AcceptFailure>

Source

fn abandon(&self, accepted: Self::Accepted) -> Self::Reclaimed

Source

fn reclaim(&self, creation: Self::Creation)

Source

fn retirement(&self) -> Self::Retirement

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§