pub struct FakeDataStream {
pub size: u64,
/* private fields */
}Expand description
Fake (or virtual) data stream.
Fields§
§size: u64The size.
Implementations§
Trait Implementations§
Source§impl DataStream for FakeDataStream
impl DataStream for FakeDataStream
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, ErrorTrace>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, ErrorTrace>
Reads data at the current position.
Source§fn seek(&mut self, pos: SeekFrom) -> Result<u64, ErrorTrace>
fn seek(&mut self, pos: SeekFrom) -> Result<u64, ErrorTrace>
Sets the current position of the data.
Source§fn read_at_position(
&mut self,
buf: &mut [u8],
pos: SeekFrom,
) -> Result<usize, ErrorTrace>
fn read_at_position( &mut self, buf: &mut [u8], pos: SeekFrom, ) -> Result<usize, ErrorTrace>
Reads data at a specific position.
Source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), ErrorTrace>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), ErrorTrace>
Reads an exact amount of data at the current position.
Source§fn read_exact_at_position(
&mut self,
buf: &mut [u8],
pos: SeekFrom,
) -> Result<u64, ErrorTrace>
fn read_exact_at_position( &mut self, buf: &mut [u8], pos: SeekFrom, ) -> Result<u64, ErrorTrace>
Reads an exact amount of data at a specific position.
Auto Trait Implementations§
impl Freeze for FakeDataStream
impl RefUnwindSafe for FakeDataStream
impl Send for FakeDataStream
impl Sync for FakeDataStream
impl Unpin for FakeDataStream
impl UnwindSafe for FakeDataStream
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