mirror of
https://github.com/callumio/suck.git
synced 2025-12-17 03:29:21 +00:00
feat: add error types
This commit is contained in:
parent
3f22921986
commit
d5cabeeedc
2 changed files with 17 additions and 0 deletions
15
src/error.rs
Normal file
15
src/error.rs
Normal 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,
|
||||
}
|
||||
|
|
@ -1 +1,3 @@
|
|||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub mod error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue