[−][src]Struct bufferpool::BufferPool
A "vector of vectors" backed by a single contiguous vector. Allows for mutable borrows of non-overlapping regions.
Methods
impl<V: Default + Clone> BufferPool<V>
[src]
pub fn builder() -> BufferPoolBuilder<V>
[src]
pub fn get_buffer_size(&self) -> usize
[src]
pub fn try_clear(&mut self) -> Result<(), ()>
[src]
Set all of the values back to their defaults
pub fn clear(&mut self)
[src]
pub fn capacity(&self) -> usize
[src]
Return the max number of buffers
pub fn change_buffer_size(&mut self, new_buffer_size: usize)
[src]
pub fn try_change_buffer_size(
&mut self,
new_buffer_size: usize
) -> Result<(), ()>
[src]
&mut self,
new_buffer_size: usize
) -> Result<(), ()>
Resize the internal buffers
pub fn resize_len_and_buffer(&mut self, new_len: usize, new_buffer_size: usize)
[src]
pub fn is_empty(&self) -> bool
[src]
Check whether the buffer pool has no capacity
pub fn reserve(&mut self, additional: usize)
[src]
pub fn try_reserve(&mut self, additional: usize) -> Result<(), ()>
[src]
Reserve an additional number of buffers
pub fn is_borrowed(&self) -> bool
[src]
Checks to see whether any of the internal slices have been borrowed.
pub fn resize(&mut self, new_len: usize)
[src]
pub fn try_resize(&mut self, new_len: usize) -> Result<(), ()>
[src]
Change the number of internal buffers
pub fn get_cleared_space(&mut self) -> Result<BufferPoolReference<V>, ()>
[src]
Get a reference to a slice of the BufferPool
setting the values of the
pool back to their default value.
pub fn get_space(&mut self) -> Result<BufferPoolReference<V>, ()>
[src]
Get a reference to a slice of the BufferPool
.
Trait Implementations
impl<V: Default + Clone> Default for BufferPool<V>
[src]
fn default() -> BufferPool<V>
[src]
Auto Trait Implementations
impl<V> !RefUnwindSafe for BufferPool<V>
impl<V> !Send for BufferPool<V>
impl<V> !Sync for BufferPool<V>
impl<V> Unpin for BufferPool<V>
impl<V> !UnwindSafe for BufferPool<V>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,