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 Freeze for CaptureIo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)