fix: implement error for error types

Fixes the failing doctests
This commit is contained in:
Callum Leslie 2025-09-02 21:56:53 +01:00
parent 33f6d33a15
commit 828c06e872
Signed by: cleslie
GPG key ID: D382C4AFEECEAA90
2 changed files with 8 additions and 1 deletions

View file

@ -1,15 +1,21 @@
use thiserror::Error;
/// Errors that can occur when using the suck channel
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Error, Debug, Clone, PartialEq, Eq)]
pub enum Error {
/// Channel has been closed gracefully
#[error("Channel closed")]
ChannelClosed,
/// Producer has disconnected unexpectedly
#[error("Producer disconnected")]
ProducerDisconnected,
/// No value source has been set
#[error("Producer has not set a source value")]
NoSource,
/// Internal error (e.g., mutex poisoning or source execution failure)
#[error("Internal error occured")] // TODO: Expand on this
InternalError,
}