pub struct MemoryIO { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Clock for MemoryIO
impl Clock for MemoryIO
Source§fn current_time_monotonic(&self) -> MonotonicInstant
fn current_time_monotonic(&self) -> MonotonicInstant
Monotonic time for timeout checking and elapsed time measurement.
Cheap on real systems (reads TSC), controllable in simulation.
Source§fn current_time_wall_clock(&self) -> WallClockInstant
fn current_time_wall_clock(&self) -> WallClockInstant
Wall-clock time for timestamps (WAL, datetime functions).
Controllable in simulation for deterministic behavior.
Source§impl IO for MemoryIO
impl IO for MemoryIO
fn open_file( &self, path: &str, flags: OpenFlags, _direct: bool, ) -> Result<Arc<dyn File>>
fn remove_file(&self, path: &str) -> Result<()>
Source§fn file_id(&self, path: &str) -> Result<FileId>
fn file_id(&self, path: &str) -> Result<FileId>
Return the file identity for the given path.
Default uses OS-level metadata; non-filesystem backends override
with synthetic hash-based identity.
Whether this IO backend can back host-filesystem shared WAL coordination.
fn step(&self) -> Result<()>
fn cancel(&self, c: &[Completion]) -> Result<()>
Source§fn drain_completions(&self, completions: &[Completion]) -> Result<()>
fn drain_completions(&self, completions: &[Completion]) -> Result<()>
Drive the IO backend until each completion in
completions is
finished(). Used after cancel() (so cancelled ops actually
release their buffers before the caller returns) and after a
single pwrite/pwritev/sync that the caller wants to await
synchronously. Read morefn wait_for_completion(&self, c: Completion) -> Result<()>
fn generate_random_number(&self) -> i64
Source§fn fill_bytes(&self, dest: &mut [u8])
fn fill_bytes(&self, dest: &mut [u8])
Fill
dest with random data.fn get_memory_io(&self) -> Arc<MemoryIO> ⓘ
fn register_fixed_buffer(&self, _ptr: NonNull<u8>, _len: usize) -> Result<u32>
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryIO
impl !UnwindSafe for MemoryIO
impl Freeze for MemoryIO
impl Send for MemoryIO
impl Sync for MemoryIO
impl Unpin for MemoryIO
impl UnsafeUnpin for MemoryIO
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<I> IOExt for I
impl<I> IOExt for I
fn block<T>( &self, f: impl FnMut() -> Result<IOResult<T>, LimboError>, ) -> Result<T, LimboError>
async fn wait<T, F>(&self, f: F) -> Result<T, LimboError>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more