pub trait Queue: Sized {
type Event: Event;
type Capacity: Count;
type Vacancy<'a>: Vacancy<Event = Self::Event>
where Self: 'a;
// Required methods
fn try_new(capacity: Self::Capacity) -> Result<Self, Error>;
fn vacant(&mut self) -> Option<Self::Vacancy<'_>>;
fn pop_front(&mut self) -> Option<Dequeued<Self::Event>>;
fn suppress(&mut self, key: <Self::Event as Event>::Key);
fn is_terminal(&self, key: <Self::Event as Event>::Key) -> bool;
fn is_empty(&self) -> bool;
fn available(&self) -> usize;
}Required Associated Types§
type Event: Event
type Capacity: Count
type Vacancy<'a>: Vacancy<Event = Self::Event>where
Self: 'a,
Required Methods§
fn try_new(capacity: Self::Capacity) -> Result<Self, Error>
fn vacant(&mut self) -> Option<Self::Vacancy<'_>>
fn pop_front(&mut self) -> Option<Dequeued<Self::Event>>
fn suppress(&mut self, key: <Self::Event as Event>::Key)
fn is_terminal(&self, key: <Self::Event as Event>::Key) -> bool
fn is_empty(&self) -> bool
fn available(&self) -> usize
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".