Skip to main content

Queue

Trait Queue 

Source
pub trait Queue: Sized {
    type Key: Key;
    type Index: Compact;
    type Capability;

    // Required methods
    fn try_acquire() -> Result<Self::Capability, Absent>;
    fn try_arm(
        &self,
        permit: &Self::Capability,
        index: Self::Index,
        key: Self::Key,
    ) -> Result<(), Self::Key>;
    fn cancel(
        &self,
        permit: &Self::Capability,
        index: Self::Index,
        key: Self::Key,
    ) -> State<Self::Key>;
    fn take(
        &self,
        permit: &Self::Capability,
        index: Self::Index,
        key: Self::Key,
    ) -> State<Self::Key>;
    fn grant_one(
        &self,
        permit: &Self::Capability,
    ) -> Option<(Self::Index, Self::Key)>;
}
Expand description

Generation-exact registration storage selected by the native backend.

Required Associated Types§

Required Methods§

Source

fn try_acquire() -> Result<Self::Capability, Absent>

Source

fn try_arm( &self, permit: &Self::Capability, index: Self::Index, key: Self::Key, ) -> Result<(), Self::Key>

Source

fn cancel( &self, permit: &Self::Capability, index: Self::Index, key: Self::Key, ) -> State<Self::Key>

Source

fn take( &self, permit: &Self::Capability, index: Self::Index, key: Self::Key, ) -> State<Self::Key>

Source

fn grant_one( &self, permit: &Self::Capability, ) -> Option<(Self::Index, Self::Key)>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§