Struct rune::modules::capture_io::CaptureIo
source · pub struct CaptureIo { /* private fields */ }
Expand description
Type which captures output from rune scripts.
Implementations§
source§impl CaptureIo
impl CaptureIo
sourcepub fn drain(&self) -> Vec<u8> ⓘ
pub fn drain(&self) -> Vec<u8> ⓘ
Drain all captured I/O that has been written to output functions.
sourcepub fn drain_into<O>(&self, out: O) -> Result<()>where
O: Write,
Available on crate feature std
only.
pub fn drain_into<O>(&self, out: O) -> Result<()>where
O: Write,
std
only.Drain all captured I/O that has been written to output functions into the given Write.
sourcepub fn drain_utf8(&self) -> Result<String, FromUtf8Error>
pub fn drain_utf8(&self) -> Result<String, FromUtf8Error>
Drain all captured I/O that has been written to output functions and try to decode as UTF-8.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CaptureIo
impl Send for CaptureIo
impl Sync for CaptureIo
impl Unpin for CaptureIo
impl !UnwindSafe for CaptureIo
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