pub struct Captured { /* private fields */ }Expand description
What a run kept of one output stream.
Implementations§
Source§impl Captured
impl Captured
Sourcepub fn bytes(&self) -> &[u8] ⓘ
pub fn bytes(&self) -> &[u8] ⓘ
Returns the kept bytes: the first bytes of a stream kept whole, the last bytes of a tail, and nothing of a discarded stream.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Returns the kept bytes, consuming what was captured.
Sourcepub const fn over_limit(&self) -> bool
pub const fn over_limit(&self) -> bool
Returns true when the stream was longer than its limit, so the kept bytes, or the lines delivered, are not all of it.
Trait Implementations§
impl Eq for Captured
impl StructuralPartialEq for Captured
Auto Trait Implementations§
impl Forget for Captured
impl Freeze for Captured
impl RefUnwindSafe for Captured
impl Send for Captured
impl Sync for Captured
impl Unpin for Captured
impl UnsafeUnpin for Captured
impl UnwindSafe for Captured
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