diff options
Diffstat (limited to 'src/blocking')
-rw-r--r-- | src/blocking/reader.rs | 12 | ||||
-rw-r--r-- | src/blocking/writer.rs | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/blocking/reader.rs b/src/blocking/reader.rs index 86c348d..609c393 100644 --- a/src/blocking/reader.rs +++ b/src/blocking/reader.rs @@ -1,4 +1,4 @@ -/// Reads ttyrec frames from a `std::io::Read` instance. +/// Reads ttyrec frames from a [`std::io::Read`] instance. pub struct Reader<T: std::io::Read> { input: T, parser: crate::Parser, @@ -6,7 +6,7 @@ pub struct Reader<T: std::io::Read> { } impl<T: std::io::Read> Reader<T> { - /// Creates a new `Reader` from a `std::io::Read` instance. + /// Creates a new [`Reader`] from a [`std::io::Read`] instance. pub fn new(input: T) -> Self { Self { input, @@ -18,9 +18,9 @@ impl<T: std::io::Read> Reader<T> { /// Returns the next parsed frame from the input stream. /// /// # Errors - /// * `crate::Error::EOF`: The input stream has been closed. - /// * `crate::Error::Read`: There was an error reading from the input - /// stream. + /// * [`Error::EOF`](crate::Error::EOF): The input stream has been closed. + /// * [`Error::Read`](crate::Error::Read): There was an error reading from + /// the input stream. pub fn read_frame(&mut self) -> crate::Result<crate::Frame> { loop { if let Some(frame) = self.parser.next_frame() { @@ -39,7 +39,7 @@ impl<T: std::io::Read> Reader<T> { /// How much the timestamps in this file should be offset by. /// - /// See `Parser::offset`. + /// See [`Parser::offset`](crate::Parser::offset). pub fn offset(&self) -> Option<std::time::Duration> { self.parser.offset() } diff --git a/src/blocking/writer.rs b/src/blocking/writer.rs index 5dade25..c9fdb7d 100644 --- a/src/blocking/writer.rs +++ b/src/blocking/writer.rs @@ -1,11 +1,11 @@ -/// Writes ttyrec frames to a `std::io::Write` instance. +/// Writes ttyrec frames to a [`std::io::Write`] instance. pub struct Writer<T: std::io::Write> { output: T, creator: crate::Creator, } impl<T: std::io::Write> Writer<T> { - /// Creates a new `Writer` from a `std::io::Write` instance. + /// Creates a new [`Writer`] from a [`std::io::Write`] instance. pub fn new(output: T) -> Self { Self { output, @@ -17,8 +17,8 @@ impl<T: std::io::Write> Writer<T> { /// given data. /// /// # Errors - /// * `crate::Error::Write`: There was an error writing to the input - /// stream. + /// * [`Error::Write`](crate::Error::Write): There was an error writing to + /// the input stream. pub fn frame(&mut self, data: &[u8]) -> crate::Result<()> { self.frame_at(std::time::Instant::now(), data) } @@ -27,8 +27,8 @@ impl<T: std::io::Write> Writer<T> { /// data. /// /// # Errors - /// * `crate::Error::Write`: There was an error writing to the input - /// stream. + /// * [`crate::Error::Write`](crate::Error::Write): There was an error + /// writing to the input stream. pub fn frame_at( &mut self, cur_time: std::time::Instant, |