ps-buffer 0.1.0-21

aligned heap buffer
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::{Buffer, BufferError};

impl Buffer {
    #[inline]
    /// Reserves `self.length + additional` bytes.
    /// # Errors
    /// `AllocationError` is returned if allocation fails.
    pub fn reserve_exact(&mut self, additional: usize) -> Result<&mut Self, BufferError> {
        self.reserve_total(self.len() + additional)
    }
}