pub struct VenueError {
pub venue: &'static str,
pub status: Option<u16>,
pub message: String,
}Expand description
A failed venue call. The message is the text a caller stores in the journal and
mails, {METHOD} {path} -> {status} {body} for a refused request.
Fields§
§venue: &'static str§status: Option<u16>The HTTP status, when one came back.
message: StringImplementations§
Source§impl VenueError
impl VenueError
pub fn new( venue: &'static str, status: Option<u16>, message: impl Into<String>, ) -> Self
Sourcepub fn is_offline(&self) -> bool
pub fn is_offline(&self) -> bool
Did the offline switch refuse it?
Sourcepub fn is_network_failure(&self) -> bool
pub fn is_network_failure(&self) -> bool
Did the call fail on the way (a timeout, a refused or dropped connection) instead of coming back refused? Nothing was answered, so a read may safely ask again.
Sourcepub fn is_ip_refusal(&self) -> bool
pub fn is_ip_refusal(&self) -> bool
The venue refused the key from this address. On Gate a key without an IP allowlist is disabled after 90 days, silently, and that is what this looks like.
Trait Implementations§
Source§impl Clone for VenueError
impl Clone for VenueError
Source§impl Debug for VenueError
impl Debug for VenueError
Source§impl Display for VenueError
impl Display for VenueError
Source§impl Error for VenueError
impl Error for VenueError
1.30.0 · 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 PartialEq for VenueError
impl PartialEq for VenueError
impl StructuralPartialEq for VenueError
Auto Trait Implementations§
impl Freeze for VenueError
impl RefUnwindSafe for VenueError
impl Send for VenueError
impl Sync for VenueError
impl Unpin for VenueError
impl UnsafeUnpin for VenueError
impl UnwindSafe for VenueError
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