aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-10-27 08:07:09 -0400
committerJesse Luehrs <doy@tozt.net>2019-10-27 08:07:09 -0400
commit17fc6b3eda370f99fee48420532ada8b497ecd8c (patch)
treecf8067dc80e700bf3056e22e86942e13e4fd3795 /src/error.rs
parent9739318498f8b78788923986d77a7b436d6af12a (diff)
downloadttyrec-17fc6b3eda370f99fee48420532ada8b497ecd8c.tar.gz
ttyrec-17fc6b3eda370f99fee48420532ada8b497ecd8c.zip
docs
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index aa315e6..975889b 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,18 +1,26 @@
+/// Errors potentially returned by this crate.
#[derive(Debug, snafu::Snafu)]
#[snafu(visibility(pub))]
pub enum Error {
+ /// eof
#[snafu(display("eof"))]
EOF,
+ /// failed to create ttyrec frame: got N bytes of data but ttyrec frames
+ /// can be at most M bytes
#[snafu(display("failed to create ttyrec frame: got {} bytes of data, but ttyrec frames can be at most {} bytes", input, u32::max_value()))]
FrameTooBig { input: usize },
+ /// failed to create ttyrec frame: got N seconds but ttyrec frames can be
+ /// at most M seconds
#[snafu(display("failed to create ttyrec frame: got {} seconds, but ttyrecs can be at most {} seconds", input, u32::max_value()))]
FrameTooLong { input: u64 },
+ /// failed to read from file
#[snafu(display("failed to read from file: {}", source))]
ReadFile { source: tokio::io::Error },
+ /// failed to write to file
#[snafu(display("failed to write to file: {}", source))]
WriteFile { source: tokio::io::Error },
}