pub struct SeekAdapter<R: Clone + Read<Error: Copy> + Seek> { /* private fields */ }
Expand description
An adapter from embedded_io::Seek
to core_json::BytesLike
.
This will Clone
the underlying reader less frequently than ReadAdapter
due to being able
to use Seek
to implement peek
.
Trait Implementations§
Source§impl<R: Clone + Read<Error: Copy> + Seek> BytesLike<'static> for SeekAdapter<R>
impl<R: Clone + Read<Error: Copy> + Seek> BytesLike<'static> for SeekAdapter<R>
Source§type ExternallyTrackedLength = usize
type ExternallyTrackedLength = usize
The type representing the length of a read
BytesLike
, if a BytesLike
does not
inherently know its length. Read moreSource§fn len(&self, len: Self::ExternallyTrackedLength) -> usize
fn len(&self, len: Self::ExternallyTrackedLength) -> usize
The length of these bytes.
Source§fn read_bytes(
&mut self,
bytes: usize,
) -> Result<(Self::ExternallyTrackedLength, Self), Self::Error>
fn read_bytes( &mut self, bytes: usize, ) -> Result<(Self::ExternallyTrackedLength, Self), Self::Error>
Read a fixed amount of bytes from the container. Read more
Auto Trait Implementations§
impl<R> !Freeze for SeekAdapter<R>
impl<R> !RefUnwindSafe for SeekAdapter<R>
impl<R> Send for SeekAdapter<R>
impl<R> !Sync for SeekAdapter<R>
impl<R> Unpin for SeekAdapter<R>
impl<R> UnwindSafe for SeekAdapter<R>
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