#[repr(C)]pub struct Deque<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> {
pub sequence_number: u64,
pub head: u32,
pub tail: u32,
/* private fields */
}
Fields§
§sequence_number: u64
§head: u32
§tail: u32
Implementations§
source§impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Deque<T, MAX_SIZE>
impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Deque<T, MAX_SIZE>
pub fn new() -> Self
pub fn initialize(&mut self)
pub fn front(&self) -> Option<&T>
pub fn back(&self) -> Option<&T>
pub fn get_next(&self, index: u32) -> u32
pub fn get_prev(&self, index: u32) -> u32
pub fn push_back(&mut self, node: T)
pub fn push_front(&mut self, node: T)
pub fn pop_front(&mut self) -> Option<T>
pub fn pop_back(&mut self) -> Option<T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> DequeIterator<'_, T, MAX_SIZE> ⓘ
pub fn iter_mut(&mut self) -> DequeIteratorMut<'_, T, MAX_SIZE> ⓘ
Trait Implementations§
source§impl<T: Clone + Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Clone for Deque<T, MAX_SIZE>
impl<T: Clone + Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Clone for Deque<T, MAX_SIZE>
source§impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Default for Deque<T, MAX_SIZE>
impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Default for Deque<T, MAX_SIZE>
source§impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> FromSlice for Deque<T, MAX_SIZE>
impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> FromSlice for Deque<T, MAX_SIZE>
fn new_from_slice(slice: &mut [u8]) -> &mut Self
source§impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> ZeroCopy for Deque<T, MAX_SIZE>
impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> ZeroCopy for Deque<T, MAX_SIZE>
source§impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Zeroable for Deque<T, MAX_SIZE>
impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Zeroable for Deque<T, MAX_SIZE>
impl<T: Copy + Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Copy for Deque<T, MAX_SIZE>
impl<T: Default + Copy + Clone + Pod + Zeroable, const MAX_SIZE: usize> Pod for Deque<T, MAX_SIZE>
Auto Trait Implementations§
impl<T, const MAX_SIZE: usize> RefUnwindSafe for Deque<T, MAX_SIZE>where T: RefUnwindSafe,
impl<T, const MAX_SIZE: usize> Send for Deque<T, MAX_SIZE>where T: Send,
impl<T, const MAX_SIZE: usize> Sync for Deque<T, MAX_SIZE>where T: Sync,
impl<T, const MAX_SIZE: usize> Unpin for Deque<T, MAX_SIZE>where T: Unpin,
impl<T, const MAX_SIZE: usize> UnwindSafe for Deque<T, MAX_SIZE>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.