[−][src]Struct chunky::Vector
A vector which stores items of a known type in an Arena
Methods
impl<Item: Clone> Vector<Item>
[src]
pub fn new(
ident: Ident,
chunk_size: usize,
storage: Rc<dyn ChunkStorage>
) -> Self
[src]
ident: Ident,
chunk_size: usize,
storage: Rc<dyn ChunkStorage>
) -> Self
Create a new chunky vector
pub fn len(&self) -> usize
[src]
Get the number of elements in the vector
pub fn is_empty(&self) -> bool
[src]
Is the chunky vector empty?
pub fn at(&self, index: usize) -> Option<&Item>
[src]
Get a reference to the item at index
pub fn at_mut(&mut self, index: usize) -> Option<&mut Item>
[src]
Get a mutable reference to the item at index
pub fn push(&mut self, item: Item)
[src]
Push an item onto the vector
pub fn pop(&mut self) -> Option<Item>
[src]
Remove and return the last item, if the vector wasn't empty
Auto Trait Implementations
impl<Item> !Sync for Vector<Item>
impl<Item> !Send for Vector<Item>
impl<Item> Unpin for Vector<Item> where
Item: Unpin,
Item: Unpin,
impl<Item> !RefUnwindSafe for Vector<Item>
impl<Item> !UnwindSafe for Vector<Item>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,