From 05cefcdf32b2d3dc9a2cf3f9b391bfda785bd801 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 25 Oct 2019 06:34:48 -0400 Subject: break it up into files --- src/error.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/error.rs (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..923ad4f --- /dev/null +++ b/src/error.rs @@ -0,0 +1,17 @@ +#[derive(Debug, snafu::Snafu)] +#[snafu(visibility(pub))] +pub enum Error { + #[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 }, + + #[snafu(display("failed to create ttyrec frame: got {} seconds, but ttyrecs can be at most {} seconds", input, u32::max_value()))] + FrameTooLong { input: u64 }, + + #[snafu(display("failed to read from file: {}", source))] + ReadFile { source: tokio::io::Error }, + + #[snafu(display("failed to write to file: {}", source))] + WriteFile { source: tokio::io::Error }, +} + +pub type Result = std::result::Result; -- cgit v1.2.3-54-g00ecf