A rebase ate my doc comment!

This commit is contained in:
James Munns 2024-01-19 15:46:36 +01:00
parent 1ce96f79fb
commit 5e08bb8bc3

View File

@ -125,6 +125,7 @@ pub enum Error {
pub enum ReadToBreakError {
/// Read this many bytes, but never received a line break.
MissingBreak(usize),
/// Other, standard issue with the serial request
Other(Error),
}
@ -936,6 +937,9 @@ impl<'d, T: Instance> Uart<'d, T, Async> {
self.rx.read(buffer).await
}
/// Read until the buffer is full or a line break occurs.
///
/// See [`UartRx::read_to_break()`] for more details
pub async fn read_to_break<'a>(&mut self, buf: &'a mut [u8]) -> Result<usize, ReadToBreakError> {
self.rx.read_to_break(buf).await
}