diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-04 03:50:22 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-04 03:50:22 -0500 |
commit | 57f245da290fee5a1cb2e9526fd30df3a2fb379d (patch) | |
tree | 9a881db398840a976cb9af30fbea348535fe5100 /src/creator.rs | |
parent | 3ba8bad931571f9a2586dd02d50415dc8428ed41 (diff) | |
download | ttyrec-57f245da290fee5a1cb2e9526fd30df3a2fb379d.tar.gz ttyrec-57f245da290fee5a1cb2e9526fd30df3a2fb379d.zip |
fix doc links0.3.0
Diffstat (limited to 'src/creator.rs')
-rw-r--r-- | src/creator.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/creator.rs b/src/creator.rs index f4745cc..590d282 100644 --- a/src/creator.rs +++ b/src/creator.rs @@ -1,35 +1,36 @@ /// Creates ttyrec frames. /// /// A ttyrec file is a stream of concatenated frames. This struct creates -/// `Frame` objects, which can be serialized to bytes using their `try_from` -/// implementation, and then a ttyrec file can be generated by concatenating -/// those byte strings. +/// [`Frame`](crate::Frame) objects, which can be serialized to bytes using +/// their `try_from` implementation, and then a ttyrec file can be generated +/// by concatenating those byte strings. #[derive(Debug, Clone)] pub struct Creator { base_time: Option<std::time::Instant>, } impl Creator { - /// Creates a new `Creator` instance. + /// Creates a new [`Creator`] instance. #[must_use] pub fn new() -> Self { Self::default() } - /// Returns a new `Frame` object containing the given data. + /// Returns a new [`Frame`](crate::Frame) object containing the given + /// data. /// - /// Equivalent to calling `frame_at` and passing - /// `std::time::Instant::now()` as the `cur_time` parameter. + /// Equivalent to calling [`frame_at`](Self::frame_at) and passing + /// [`std::time::Instant::now()`] as the `cur_time` parameter. pub fn frame(&mut self, data: &[u8]) -> crate::frame::Frame { self.frame_at(std::time::Instant::now(), data) } - /// Returns a new `Frame` object containing the given data at the given - /// time. + /// Returns a new [`Frame`](crate::Frame) object containing the given data + /// at the given time. /// /// Note that this is not guaranteed to do the correct thing unless the - /// `cur_time` parameters given in each `frame_at` call are - /// non-decreasing. + /// `cur_time` parameters given in each [`frame_at`](Self::frame_at) call + /// are non-decreasing. #[allow(clippy::missing_panics_doc)] pub fn frame_at( &mut self, |