pub enum KagiError {
InvalidCredential {
kind: CredentialKind,
reason: String,
},
MissingCredentialConfiguration {
reason: String,
},
ConflictingCredentialConfiguration {
already_set: CredentialKind,
attempted: CredentialKind,
},
InvalidInput {
field: &'static str,
reason: String,
},
InvalidClientConfiguration {
reason: String,
},
UnsupportedAuthSurface {
surface: ProtocolSurface,
credential: CredentialKind,
expected: CredentialKind,
},
UnsupportedCapability {
endpoint: EndpointId,
credential: CredentialKind,
expected: CredentialKind,
},
Transport {
endpoint: EndpointId,
source: Error,
},
ResponseParse {
endpoint: EndpointId,
parser: ParserShape,
reason: String,
},
UnauthorizedBotToken {
endpoint: EndpointId,
message: String,
},
InvalidSession {
endpoint: EndpointId,
status: u16,
message: String,
},
ApiFailure {
endpoint: EndpointId,
status: u16,
code: Option<String>,
message: String,
},
}Variants§
InvalidCredential
MissingCredentialConfiguration
ConflictingCredentialConfiguration
InvalidInput
InvalidClientConfiguration
UnsupportedAuthSurface
UnsupportedCapability
Transport
ResponseParse
Fields
InvalidSession
ApiFailure
Trait Implementations§
Source§impl Error for KagiError
impl Error for KagiError
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()
Auto Trait Implementations§
impl Freeze for KagiError
impl !RefUnwindSafe for KagiError
impl Send for KagiError
impl Sync for KagiError
impl Unpin for KagiError
impl UnsafeUnpin for KagiError
impl !UnwindSafe for KagiError
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.