pub struct SimDevice { /* private fields */ }Expand description
The shared log’s segment files on the simulated disk (wal/), or its
blob area’s files (blob/, which grow by appends; a crash resolves
their pending writes like any others’, independently of the log’s).
Trait Implementations§
Source§impl LogDevice for SimDevice
impl LogDevice for SimDevice
fn len(&self, segment: u64) -> Result<u64>
Source§fn read(&self, segment: u64, offset: u64, len: usize) -> Result<Vec<u8>>
fn read(&self, segment: u64, offset: u64, len: usize) -> Result<Vec<u8>>
Up to
len bytes at offset, fewer at the end of the file.Source§fn create(&self, segment: u64, len: u64) -> Result<()>
fn create(&self, segment: u64, len: u64) -> Result<()>
Creates segment
segment with len bytes, ready for overwrites,
durably (file and directory entry).Source§fn write(&self, segment: u64, offset: u64, bytes: &[u8]) -> Result<()>
fn write(&self, segment: u64, offset: u64, bytes: &[u8]) -> Result<()>
Writes at
offset; durable only after sync.fn sync(&self, segment: u64) -> Result<()>
fn remove(&self, segment: u64) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for SimDevice
impl !Send for SimDevice
impl !Sync for SimDevice
impl !UnwindSafe for SimDevice
impl Forget for SimDevice
impl Freeze for SimDevice
impl Move for SimDevice
impl Unpin for SimDevice
impl UnsafeUnpin for SimDevice
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