[−][src]Struct abscissa_core::testing::process::Stderr
Buffered reader for standard error
Methods from Deref<Target = BufReader<ChildStderr>>
pub fn get_ref(&self) -> &R
1.0.0[src]
Gets a reference to the underlying reader.
It is inadvisable to directly read from the underlying reader.
Examples
use std::io::BufReader; use std::fs::File; fn main() -> std::io::Result<()> { let f1 = File::open("log.txt")?; let reader = BufReader::new(f1); let f2 = reader.get_ref(); Ok(()) }
pub fn get_mut(&mut self) -> &mut R
1.0.0[src]
Gets a mutable reference to the underlying reader.
It is inadvisable to directly read from the underlying reader.
Examples
use std::io::BufReader; use std::fs::File; fn main() -> std::io::Result<()> { let f1 = File::open("log.txt")?; let mut reader = BufReader::new(f1); let f2 = reader.get_mut(); Ok(()) }
pub fn buffer(&self) -> &[u8]
1.37.0[src]
Returns a reference to the internally buffered data.
Unlike fill_buf
, this will not attempt to fill the buffer if it is empty.
Examples
use std::io::{BufReader, BufRead}; use std::fs::File; fn main() -> std::io::Result<()> { let f = File::open("log.txt")?; let mut reader = BufReader::new(f); assert!(reader.buffer().is_empty()); if reader.fill_buf()?.len() > 0 { assert!(!reader.buffer().is_empty()); } Ok(()) }
pub fn seek_relative(&mut self, offset: i64) -> Result<(), Error>
[src]
bufreader_seek_relative
)Seeks relative to the current position. If the new position lies within the buffer, the buffer will not be flushed, allowing for more efficient seeks. This method does not return the location of the underlying reader, so the caller must track this information themselves if it is required.
Trait Implementations
impl OutputStream<ChildStderr> for Stderr
[src]
fn expect_line(&mut self, expected_line: &str)
[src]
Read a line and ensure it matches the expected value. Read more
fn expect_regex<T>(&mut self, regex: T) where
T: Into<Regex>,
[src]
T: Into<Regex>,
Read a line and test it against the given regex. Read more
impl DerefMut for Stderr
[src]
fn deref_mut(&mut self) -> &mut BufReader<ChildStderr>
[src]
impl Debug for Stderr
[src]
impl Deref for Stderr
[src]
type Target = BufReader<ChildStderr>
The resulting type after dereferencing.
fn deref(&self) -> &BufReader<ChildStderr>
[src]
Auto Trait Implementations
impl Sync for Stderr
impl Send for Stderr
impl Unpin for Stderr
impl RefUnwindSafe for Stderr
impl UnwindSafe for Stderr
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,