#[non_exhaustive]pub enum CallError {
Status(u16),
Certificate(Refusal),
NoSuchNode {
asked: String,
found: Vec<String>,
},
NoNode,
Other(String),
}Expand description
Why a call to the API failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Status(u16)
The API answered with this HTTP status, not a success (403: the user may not).
Certificate(Refusal)
The server’s certificate was refused (it changed since it was pinned).
NoSuchNode
There is no node by the name asked: the ones there are.
NoNode
The user can see no node at all.
Other(String)
No answer that could be read (network, not the API’s JSON): why.
Trait Implementations§
impl Eq for CallError
Source§impl Error for CallError
impl Error for CallError
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()
impl StructuralPartialEq for CallError
Auto Trait Implementations§
impl Forget for CallError
impl Freeze for CallError
impl Move for CallError
impl RefUnwindSafe for CallError
impl Send for CallErrorwhere
RawVecInner: Send,
impl Sync for CallErrorwhere
RawVecInner: Sync,
impl Unpin for CallError
impl UnsafeUnpin for CallErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for CallErrorwhere
RawVecInner: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.