pub enum NotificationConfigError {
Refused(FilterDenial),
TransientFailure {
reason: String,
},
}Expand description
Failure modes for a delivery attempt, in priority order.
Refused (the filter denied the URL) is distinct from
TransientFailure (the filter accepted the URL but the network
refused) so the handler can choose to surface one and silently retry
the other. The split is what makes the difference between “the client
is malicious” and “the network is bad” a typed answer.
Variants§
Refused(FilterDenial)
The URL was rejected at config time. Surfacing this lets the handler answer the client with the typed refusal; retrying will not help.
TransientFailure
The URL was accepted but the delivery step failed (network, timeout, non-2xx, or a redirect loop). The handler decides whether to retry; the port reports the failure as a structured reason.
Trait Implementations§
Source§impl Debug for NotificationConfigError
impl Debug for NotificationConfigError
Source§impl Display for NotificationConfigError
impl Display for NotificationConfigError
Source§impl Error for NotificationConfigError
impl Error for NotificationConfigError
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<FilterDenial> for NotificationConfigError
impl From<FilterDenial> for NotificationConfigError
Source§fn from(source: FilterDenial) -> Self
fn from(source: FilterDenial) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NotificationConfigError
impl RefUnwindSafe for NotificationConfigError
impl Send for NotificationConfigError
impl Sync for NotificationConfigError
impl Unpin for NotificationConfigError
impl UnsafeUnpin for NotificationConfigError
impl UnwindSafe for NotificationConfigError
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