diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..e1273d9 --- /dev/null +++ b/src/error.rs @@ -0,0 +1,15 @@ +/// Errors that can occur when using the suck channel +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Error { + /// Channel has been closed gracefully + ChannelClosed, + + /// Producer has disconnected unexpectedly + ProducerDisconnected, + + /// No value source has been set + NoSource, + + /// Closure execution panicked + ClosurePanic, +} diff --git a/src/lib.rs b/src/lib.rs index 7913c79..f5e9443 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1 +1,3 @@ #![doc = include_str!("../README.md")] + +pub mod error;