pub struct RingPtr<T> { /* private fields */ }Implementations§
Source§impl<T> RingPtr<T>
impl<T> RingPtr<T>
pub fn new_uninit(count: usize) -> RingPtr<MaybeUninit<T>>
Source§impl<T> RingPtr<MaybeUninit<T>>
impl<T> RingPtr<MaybeUninit<T>>
Sourcepub unsafe fn assume_init(self) -> RingPtr<T>
pub unsafe fn assume_init(self) -> RingPtr<T>
Source§impl<T> RingPtr<T>
impl<T> RingPtr<T>
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Returns true if the capacity is zero or the current tail is the next head position
Sourcepub const fn len(&self) -> usize
pub const fn len(&self) -> usize
Returns the ‘count’ of valid elements in the collection, not the capacity
pub const fn capacity(&self) -> usize
pub fn push(&mut self, val: T)
pub fn replace(&mut self, src: T) -> T
pub fn reset(&mut self)
pub fn pop(&mut self) -> Option<T>
pub fn peek(&self) -> &T
pub fn as_slice(&self) -> &[T]
pub fn as_mut_slice(&mut self) -> &mut [T]
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RingPtr<T>
impl<T> RefUnwindSafe for RingPtr<T>where
T: RefUnwindSafe,
impl<T> !Send for RingPtr<T>
impl<T> !Sync for RingPtr<T>
impl<T> Unpin for RingPtr<T>
impl<T> UnwindSafe for RingPtr<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more