pub struct StdReader { /* private fields */ }
Expand description
Implements a std reader wrapper around the source.
Implementations§
Source§impl StdReader
impl StdReader
Sourcepub fn get(&self, content: &dyn ContentInfo) -> Result<Vec<u8>>
pub fn get(&self, content: &dyn ContentInfo) -> Result<Vec<u8>>
Get the content of the given item.
Sourcepub fn read_exact(
&self,
content: &dyn ContentInfo,
buffer: &mut [u8],
) -> Result<()>
pub fn read_exact( &self, content: &dyn ContentInfo, buffer: &mut [u8], ) -> Result<()>
Read the content into the provided slice.
Sourcepub fn read(
&self,
content: &dyn ContentInfo,
) -> Result<MutexGuard<'_, Box<dyn ReadSeek>>>
pub fn read( &self, content: &dyn ContentInfo, ) -> Result<MutexGuard<'_, Box<dyn ReadSeek>>>
Get the slice of data representing the content requested.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StdReader
impl RefUnwindSafe for StdReader
impl !Send for StdReader
impl !Sync for StdReader
impl Unpin for StdReader
impl UnwindSafe for StdReader
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