pub struct UnixIO {}Implementations§
Trait Implementations§
Source§impl Clock for UnixIO
impl Clock for UnixIO
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 UnixIO
impl IO for UnixIO
Whether this IO backend can back host-filesystem shared WAL coordination.
fn open_file( &self, path: &str, flags: OpenFlags, _direct: bool, ) -> Result<Arc<dyn File>>
fn remove_file(&self, path: &str) -> Result<()>
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>
Source§fn yield_now(&self)
fn yield_now(&self)
Yield the current thread to the scheduler.
Used for backoff in contended lock acquisition.
Auto Trait Implementations§
impl Freeze for UnixIO
impl RefUnwindSafe for UnixIO
impl Send for UnixIO
impl Sync for UnixIO
impl Unpin for UnixIO
impl UnsafeUnpin for UnixIO
impl UnwindSafe for UnixIO
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
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