pub struct ReadAdapter<R: Clone + Read<Error: Copy>> { /* private fields */ }
Expand description
An adapter from embedded_io::Read
to core_json::BytesLike
.
SeekAdapter
SHOULD be preferred as it’ll call Clone
less frequently.
Trait Implementations§
Source§impl<R: Clone + Read<Error: Copy>> BytesLike<'static> for ReadAdapter<R>
impl<R: Clone + Read<Error: Copy>> BytesLike<'static> for ReadAdapter<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 ReadAdapter<R>
impl<R> RefUnwindSafe for ReadAdapter<R>
impl<R> Send for ReadAdapter<R>
impl<R> Sync for ReadAdapter<R>
impl<R> Unpin for ReadAdapter<R>
impl<R> UnwindSafe for ReadAdapter<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