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.
Sourcepub const fn long_line(&self) -> bool
pub const fn long_line(&self) -> bool
Returns true when the run acted on a line of a stream delivered as
lines that passed the limit of one line: that line took the stream
over its limit with LongLine::Over, or the run dropped it with
LongLine::Skip. A line does not count when the bytes that first
take it over its own limit also take the stream over the total limit,
and only Captured::over_limit tells.
Trait Implementations§
impl Eq for Captured
impl StructuralPartialEq for Captured
Auto Trait Implementations§
impl Forget for Captured
impl Freeze for Captured
impl Move 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