#[non_exhaustive]pub enum KrabkaError {
Transport(String),
Unauthenticated(String),
InvalidArgument(String),
NotFound(String),
ServerError(String),
Unimplemented {
module: &'static str,
gated_on: &'static str,
},
}Expand description
Error taxonomy shared by the app SDK contract.
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.
Transport(String)
Transport or endpoint reachability failure.
Unauthenticated(String)
Authentication failed or credentials were absent.
InvalidArgument(String)
Caller supplied an invalid argument.
NotFound(String)
Target resource was not found.
ServerError(String)
Server-side failure outside the narrower classes.
Unimplemented
SDK module is intentionally gated on later work.
Implementations§
Source§impl KrabkaError
impl KrabkaError
Sourcepub fn from_connect_code(code: &str, message: impl Into<String>) -> Self
pub fn from_connect_code(code: &str, message: impl Into<String>) -> Self
Convert a Connect code string into the SDK taxonomy.
Trait Implementations§
Source§impl Debug for KrabkaError
impl Debug for KrabkaError
Source§impl Display for KrabkaError
impl Display for KrabkaError
impl Eq for KrabkaError
Source§impl Error for KrabkaError
impl Error for KrabkaError
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 From<ConnectClientError> for KrabkaError
impl From<ConnectClientError> for KrabkaError
Source§fn from(value: ConnectClientError) -> Self
fn from(value: ConnectClientError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for KrabkaError
impl PartialEq for KrabkaError
impl StructuralPartialEq for KrabkaError
Auto Trait Implementations§
impl Freeze for KrabkaError
impl RefUnwindSafe for KrabkaError
impl Send for KrabkaError
impl Sync for KrabkaError
impl Unpin for KrabkaError
impl UnsafeUnpin for KrabkaError
impl UnwindSafe for KrabkaError
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.