pub struct SharedDataSource { /* private fields */ }Expand description
Thin wrapper that turns an Arc<dyn ByteSource> back into a ByteSource.
Implementations§
Sourcepub fn new(inner: Arc<dyn ByteSource>) -> Self
pub fn new(inner: Arc<dyn ByteSource>) -> Self
Wrap a shared source for trait-object handoff.
Trait Implementations§
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§
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