pub struct MmapBuffer { /* private fields */ }
Expand description
Buffer that uses circular buffer implemented with mirrored memory maps
Trait Implementations§
Source§impl Buffer for MmapBuffer
impl Buffer for MmapBuffer
Source§type Error = AllocError
type Error = AllocError
Error type emitted if failed to (re)allocate the buffer
Source§fn new(size: usize) -> Result<Self, AllocError>
fn new(size: usize) -> Result<Self, AllocError>
Allocate new buffer of at least size
cap
, or more.Source§fn enlarge(&mut self) -> Result<(), AllocError>
fn enlarge(&mut self) -> Result<(), AllocError>
Grow
appendable()
part of the buffer one way or the other
(by e.g. reallocating filled part of the buffer, or reallocating buffer itself)Source§fn appendable(&mut self) -> &mut [u8] ⓘ
fn appendable(&mut self) -> &mut [u8] ⓘ
Auto Trait Implementations§
impl Freeze for MmapBuffer
impl RefUnwindSafe for MmapBuffer
impl Send for MmapBuffer
impl Sync for MmapBuffer
impl Unpin for MmapBuffer
impl UnwindSafe for MmapBuffer
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