pub enum Reader<'a> {
Value(Box<dyn Read>),
Ref(&'a mut dyn Read),
}Expand description
a helper wrapper enum that is used for storing the input stream this allows for it to be passed by value OR reference
Variants§
Value(Box<dyn Read>)
used when passing in the input stream by value
Ref(&'a mut dyn Read)
used when passing in the input stream as a mutable reference
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Reader<'a>
impl<'a> !RefUnwindSafe for Reader<'a>
impl<'a> !Send for Reader<'a>
impl<'a> !Sync for Reader<'a>
impl<'a> Unpin for Reader<'a>
impl<'a> !UnwindSafe for Reader<'a>
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