pub struct ReadTrackingReader<'a, R: Read> {
pub have_read: bool,
/* private fields */
}Expand description
A Read implementation which tracks whether any bytes have been read at all. This allows us to distinguish
between “EOF reached before we started” and “EOF reached mid-read”.
This is not exported to bindings users as manual TLV building is not currently supported in bindings
Fields§
§have_read: boolReturns whether we have read from this reader or not yet.
Implementations§
Source§impl<'a, R: Read> ReadTrackingReader<'a, R>
impl<'a, R: Read> ReadTrackingReader<'a, R>
Sourcepub fn new(read: &'a mut R) -> Self
pub fn new(read: &'a mut R) -> Self
Returns a new ReadTrackingReader.
Trait Implementations§
Auto Trait Implementations§
impl<'a, R> Freeze for ReadTrackingReader<'a, R>
impl<'a, R> RefUnwindSafe for ReadTrackingReader<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for ReadTrackingReader<'a, R>where
R: Send,
impl<'a, R> Sync for ReadTrackingReader<'a, R>where
R: Sync,
impl<'a, R> Unpin for ReadTrackingReader<'a, R>
impl<'a, R> !UnwindSafe for ReadTrackingReader<'a, 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