pub struct Pool<T> { /* private fields */ }Implementations§
Source§impl<T> Pool<T>
impl<T> Pool<T>
pub fn new(vector: Vec<T>) -> Self
pub fn back(&self) -> Option<&T>
pub fn take_back(&mut self) -> Option<T>
pub fn to_back(&mut self) -> Option<&T>
pub fn first(&self) -> Option<&T>
pub fn take_first(&mut self) -> Option<T>
pub fn to_first(&mut self) -> Option<&T>
pub fn last(&self) -> Option<&T>
pub fn take_last(&mut self) -> Option<T>
pub fn to_last(&mut self) -> Option<&T>
pub fn next(&self) -> Option<&T>
pub fn take_next(&mut self) -> Option<T>
pub fn to_next(&mut self) -> Option<&T>
pub fn current(&self) -> Option<&T>
pub fn random(&self) -> Option<&T>
pub fn shuffle(&mut self)
pub fn get(&self, cursor: &Cursor) -> Option<&T>
pub fn total(&self) -> usize
Auto Trait Implementations§
impl<T> Freeze for Pool<T>
impl<T> RefUnwindSafe for Pool<T>where
T: RefUnwindSafe,
impl<T> Send for Pool<T>where
T: Send,
impl<T> Sync for Pool<T>where
T: Sync,
impl<T> Unpin for Pool<T>where
T: Unpin,
impl<T> UnwindSafe for Pool<T>where
T: UnwindSafe,
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