pub struct ReaderMut<'lt> { /* private fields */ }
Expand description
A mutable reference to a Reader
.
This type acts similar to a very fat mutable reference. It can be obtained by constructing a
concrete reader type and calling Reader::as_mut
.
Note: Any mutable reference to a Reader
implements Into<ReaderMut>
for its lifetime. Use
this instead of coercion which would be available if this was a builtin kind of reference.
Note: Any Reader
implements Into<ReaderBox>
, which can again be converted to ReaderMut
.
Use it for owning a writer without its specific type similar to Box<dyn Write>
.
Implementations§
Source§impl ReaderMut<'_>
impl ReaderMut<'_>
pub fn as_read_mut(&mut self) -> &mut (dyn Read + '_)
pub fn as_buf_mut(&mut self) -> Option<&mut (dyn BufRead + '_)>
pub fn as_seek_mut(&mut self) -> Option<&mut (dyn Seek + '_)>
Sourcepub fn as_any_mut(&mut self) -> Option<&mut dyn Any>
pub fn as_any_mut(&mut self) -> Option<&mut dyn Any>
Get the inner value as a dynamic Any
reference.
Trait Implementations§
Auto Trait Implementations§
impl<'lt> Freeze for ReaderMut<'lt>
impl<'lt> !RefUnwindSafe for ReaderMut<'lt>
impl<'lt> !Send for ReaderMut<'lt>
impl<'lt> !Sync for ReaderMut<'lt>
impl<'lt> Unpin for ReaderMut<'lt>
impl<'lt> !UnwindSafe for ReaderMut<'lt>
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