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<'_>
Sourcepub fn as_read_mut(&mut self) -> &mut (dyn Read + '_)
pub fn as_read_mut(&mut self) -> &mut (dyn Read + '_)
Get the inner value as a mutable dynamic Read reference.
Source§impl ReaderMut<'_>
impl ReaderMut<'_>
Sourcepub fn as_buf(&self) -> Option<&dyn BufRead>
pub fn as_buf(&self) -> Option<&dyn BufRead>
Get the inner value as a dynamic BufRead reference.
This returns None unless a previous call to Reader::set_buf as executed, by any other caller.
The value can be moved after such call arbitrarily.
Sourcepub fn as_buf_mut(&mut self) -> Option<&mut dyn BufRead>
pub fn as_buf_mut(&mut self) -> Option<&mut dyn BufRead>
Get the inner value as a mutable dynamic BufRead reference.
This returns None unless a previous call to Reader::set_buf as executed, by any other caller.
The value can be moved after such call arbitrarily.
Sourcepub fn as_seek(&self) -> Option<&dyn Seek>
pub fn as_seek(&self) -> Option<&dyn Seek>
Get the inner value as a dynamic Seek reference.
This returns None unless a previous call to Reader::set_seek as executed, by any other caller.
The value can be moved after such call arbitrarily.
Sourcepub fn as_seek_mut(&mut self) -> Option<&mut dyn Seek>
pub fn as_seek_mut(&mut self) -> Option<&mut dyn Seek>
Get the inner value as a mutable dynamic Seek reference.
This returns None unless a previous call to Reader::set_seek as executed, by any other caller.
The value can be moved after such call arbitrarily.
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.