feat: add error types

This commit is contained in:
Callum Leslie 2025-09-02 16:05:14 +01:00
parent 3f22921986
commit d5cabeeedc
Signed by: cleslie
GPG key ID: D382C4AFEECEAA90
2 changed files with 17 additions and 0 deletions

15
src/error.rs Normal file
View file

@ -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,
}