Struct rune_modules::capture_io::CaptureIo
source · pub struct CaptureIo { /* private fields */ }
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,
pub fn drain_into<O>(&self, out: O) -> Result<()>where O: Write,
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.