Struct lineriver::linereader::LineReader
source · pub struct LineReader<R> { /* private fields */ }
Expand description
Buffered non-blocking reader that returns only complete lines.
Implementations§
source§impl<R: Read + Debug> LineReader<R>
impl<R: Read + Debug> LineReader<R>
sourcepub fn from_nonblocking(reader: R) -> Result<Self, Error>
pub fn from_nonblocking(reader: R) -> Result<Self, Error>
Creates a new LineReader.
Assumes the reader is already non-blocking, not configuring anything in the underlying descriptor.
Trait Implementations§
source§impl<R: AsFd> AsFd for LineReader<R>
impl<R: AsFd> AsFd for LineReader<R>
source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
source§impl<R: AsRawFd> AsRawFd for LineReader<R>
impl<R: AsRawFd> AsRawFd for LineReader<R>
source§impl<R: Debug> Debug for LineReader<R>
impl<R: Debug> Debug for LineReader<R>
source§impl<R: Read + Debug> LineRead for LineReader<R>
impl<R: Read + Debug> LineRead for LineReader<R>
source§fn eof(&self) -> bool
fn eof(&self) -> bool
Returns true if we have already reached EOF in the underlying
Read
object. Read moresource§fn read_once(&mut self) -> Result<bool, Error>
fn read_once(&mut self) -> Result<bool, Error>
Performs a single read operation on the underlying
Read
object. Read moreimpl<R: AsFd + Read + Debug> LineReadFd for LineReader<R>
impl<R: AsFd + AsRawFd + Read + Debug> LineReadRawAndFd for LineReader<R>
impl<R: AsRawFd + Read + Debug> LineReadRawFd for LineReader<R>
Auto Trait Implementations§
impl<R> RefUnwindSafe for LineReader<R>where
R: RefUnwindSafe,
impl<R> Send for LineReader<R>where
R: Send,
impl<R> Sync for LineReader<R>where
R: Sync,
impl<R> Unpin for LineReader<R>where
R: Unpin,
impl<R> UnwindSafe for LineReader<R>where
R: UnwindSafe,
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