pub enum PgmqNotifyError {
Database(Error),
Serialization(Error),
Configuration {
message: String,
},
InvalidChannel {
channel: String,
},
InvalidPattern {
pattern: String,
},
NotConnected,
AlreadyListening {
channel: String,
},
Regex(Error),
Generic(Error),
Messaging(MessagingError),
Pgmq(PgmqError),
}Expand description
Errors that can occur in tasker-pgmq operations
Variants§
Database(Error)
Database connection or query errors
Serialization(Error)
JSON serialization/deserialization errors
Configuration
Invalid configuration
InvalidChannel
Invalid channel name
InvalidPattern
Invalid queue name pattern
NotConnected
Listener not connected
AlreadyListening
Channel already being listened to
Regex(Error)
Regex compilation error
Generic(Error)
Generic error for compatibility
Messaging(MessagingError)
Messaging error for compatibility with tasker-shared
Pgmq(PgmqError)
PGMQ error from underlying library
Implementations§
Source§impl PgmqNotifyError
impl PgmqNotifyError
Sourcepub fn invalid_channel<S: Into<String>>(channel: S) -> Self
pub fn invalid_channel<S: Into<String>>(channel: S) -> Self
Create an invalid channel error
Sourcepub fn invalid_pattern<S: Into<String>>(pattern: S) -> Self
pub fn invalid_pattern<S: Into<String>>(pattern: S) -> Self
Create an invalid pattern error
Sourcepub fn already_listening<S: Into<String>>(channel: S) -> Self
pub fn already_listening<S: Into<String>>(channel: S) -> Self
Create an already listening error
Trait Implementations§
Source§impl Debug for PgmqNotifyError
impl Debug for PgmqNotifyError
Source§impl Display for PgmqNotifyError
impl Display for PgmqNotifyError
Source§impl Error for PgmqNotifyError
impl Error for PgmqNotifyError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for PgmqNotifyError
impl From<Error> for PgmqNotifyError
Source§impl From<Error> for PgmqNotifyError
impl From<Error> for PgmqNotifyError
Source§impl From<Error> for PgmqNotifyError
impl From<Error> for PgmqNotifyError
Source§impl From<Error> for PgmqNotifyError
impl From<Error> for PgmqNotifyError
Source§impl From<MessagingError> for PgmqNotifyError
impl From<MessagingError> for PgmqNotifyError
Source§fn from(source: MessagingError) -> Self
fn from(source: MessagingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PgmqNotifyError
impl !RefUnwindSafe for PgmqNotifyError
impl Send for PgmqNotifyError
impl Sync for PgmqNotifyError
impl Unpin for PgmqNotifyError
impl !UnwindSafe for PgmqNotifyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more