pub struct SerialReader { /* private fields */ }Expand description
Buffered reader for SerialPort.
Implementations§
Source§impl SerialReader
impl SerialReader
Sourcepub fn new(port: Box<dyn SerialPort>) -> Self
pub fn new(port: Box<dyn SerialPort>) -> Self
Create new SerialReader connected to a SerialPort.
Sourcepub fn get_ref(&self) -> &dyn SerialPort
pub fn get_ref(&self) -> &dyn SerialPort
Get reference to underlying SerialPort.
Sourcepub fn get_mut(&mut self) -> &mut dyn SerialPort
pub fn get_mut(&mut self) -> &mut dyn SerialPort
Get mutable reference to underlying SerialPort.
Sourcepub fn read_until(&mut self, regex: &BytesRegex, trim: bool) -> Result<BytesMut>
pub fn read_until(&mut self, regex: &BytesRegex, trim: bool) -> Result<BytesMut>
Read from SerialPort until BytesRegex is matched.
Auto Trait Implementations§
impl Freeze for SerialReader
impl !RefUnwindSafe for SerialReader
impl Send for SerialReader
impl !Sync for SerialReader
impl Unpin for SerialReader
impl !UnwindSafe for SerialReader
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