[−][src]Struct random_access_memory::RandomAccessMemory
Main constructor.
Methods
impl RandomAccessMemory
[src]
pub fn new(page_size: usize) -> Self
[src]
Create a new instance.
pub fn default() -> Self
[src]
Create a new instance with a 1mb page size.
pub fn with_buffers(page_size: usize, buffers: Vec<Vec<u8>>) -> Self
[src]
Create a new instance, but pass the initial buffers to the constructor.
Trait Implementations
impl Debug for RandomAccessMemory
[src]
impl RandomAccess for RandomAccessMemory
[src]
type Error = Error
An error.
fn write(&mut self, offset: usize, data: &[u8]) -> Result<(), Self::Error>
[src]
fn read(&mut self, offset: usize, length: usize) -> Result<Vec<u8>, Self::Error>
[src]
fn read_to_writer(
&mut self,
_offset: usize,
_length: usize,
_buf: &mut impl Write
) -> Result<(), Self::Error>
[src]
&mut self,
_offset: usize,
_length: usize,
_buf: &mut impl Write
) -> Result<(), Self::Error>
fn del(&mut self, offset: usize, length: usize) -> Result<(), Self::Error>
[src]
fn truncate(&mut self, _length: usize) -> Result<(), Self::Error>
[src]
fn len(&mut self) -> Result<usize, Self::Error>
[src]
fn is_empty(&mut self) -> Result<bool, Self::Error>
[src]
Auto Trait Implementations
impl Send for RandomAccessMemory
impl Sync for RandomAccessMemory
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,