pub struct FilePagerSource { /* private fields */ }Expand description
File-backed PagerSource using std::fs::File seek + read.
Opens a new file descriptor for each read_bytes_at call, which is safe
across threads but not optimal for high-frequency reads. For throughput-
critical use cases, prefer MmapPagerSource (requires mmap feature).
Implementations§
Trait Implementations§
Source§impl PagerSource for FilePagerSource
impl PagerSource for FilePagerSource
Source§fn read_bytes_at(&self, offset: u64, out: &mut [u8]) -> Result<(), RuntimeError>
fn read_bytes_at(&self, offset: u64, out: &mut [u8]) -> Result<(), RuntimeError>
Source§fn total_size_bytes(&self) -> u64
fn total_size_bytes(&self) -> u64
Total size of the backing store in bytes.
Auto Trait Implementations§
impl Freeze for FilePagerSource
impl RefUnwindSafe for FilePagerSource
impl Send for FilePagerSource
impl Sync for FilePagerSource
impl Unpin for FilePagerSource
impl UnsafeUnpin for FilePagerSource
impl UnwindSafe for FilePagerSource
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<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