pub struct ProbeCachedDataSource<'a> { /* private fields */ }Expand description
Small-window cache for repeated probe reads near the start of a source.
Implementations§
Source§impl<'a> ProbeCachedDataSource<'a>
impl<'a> ProbeCachedDataSource<'a>
Sourcepub fn new(inner: &'a dyn ByteSource) -> Self
pub fn new(inner: &'a dyn ByteSource) -> Self
Wrap a source with a probe-oriented cache.
Trait Implementations§
Source§impl ByteSource for ProbeCachedDataSource<'_>
impl ByteSource for ProbeCachedDataSource<'_>
Source§fn read_at(&self, offset: u64, buf: &mut [u8]) -> Result<usize>
fn read_at(&self, offset: u64, buf: &mut [u8]) -> Result<usize>
Read bytes starting at
offset into buf.Source§fn capabilities(&self) -> ByteSourceCapabilities
fn capabilities(&self) -> ByteSourceCapabilities
Describe the backend’s read behavior.
Source§fn telemetry_name(&self) -> &'static str
fn telemetry_name(&self) -> &'static str
Return a stable label for tracing and diagnostics.
Source§fn read_exact_at(&self, offset: u64, buf: &mut [u8]) -> Result<()>
fn read_exact_at(&self, offset: u64, buf: &mut [u8]) -> Result<()>
Read exactly
buf.len() bytes from offset.Auto Trait Implementations§
impl<'a> !Freeze for ProbeCachedDataSource<'a>
impl<'a> !RefUnwindSafe for ProbeCachedDataSource<'a>
impl<'a> Send for ProbeCachedDataSource<'a>
impl<'a> Sync for ProbeCachedDataSource<'a>
impl<'a> Unpin for ProbeCachedDataSource<'a>
impl<'a> UnsafeUnpin for ProbeCachedDataSource<'a>
impl<'a> !UnwindSafe for ProbeCachedDataSource<'a>
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