diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-10-27 08:07:09 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-10-27 08:07:09 -0400 |
commit | 17fc6b3eda370f99fee48420532ada8b497ecd8c (patch) | |
tree | cf8067dc80e700bf3056e22e86942e13e4fd3795 /src/frame.rs | |
parent | 9739318498f8b78788923986d77a7b436d6af12a (diff) | |
download | ttyrec-17fc6b3eda370f99fee48420532ada8b497ecd8c.tar.gz ttyrec-17fc6b3eda370f99fee48420532ada8b497ecd8c.zip |
docs
Diffstat (limited to 'src/frame.rs')
-rw-r--r-- | src/frame.rs | 13 |
1 files changed, 13 insertions, 0 deletions
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<u8>, } |