From 17fc6b3eda370f99fee48420532ada8b497ecd8c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 27 Oct 2019 08:07:09 -0400 Subject: docs --- src/frame.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/frame.rs') diff --git a/src/frame.rs b/src/frame.rs index 7558470..17c6c5a 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -1,6 +1,19 @@ +/// Represents a single ttyrec frame. +/// +/// Ttyrec files are a raw concatenation of frames. Note that the `time` field +/// in each frame is the time since the start of the entire file, and it is +/// invalid for the `time` fields in a ttyrec file to be decreasing. +/// +/// Frame objects are typically created via the `Creator`, `Parser`, or +/// `Reader` classes. #[derive(Debug, Clone, PartialEq, Eq)] pub struct Frame { + /// Amount of time passed since the start of the ttyrec file. + /// + /// Note that this is *not* the amount of time since the previous frame. pub time: std::time::Duration, + + /// Bytes emitted at the given time. pub data: Vec, } -- cgit v1.2.3-54-g00ecf