pub enum KnowledgeApiError {
NotFound {
message: String,
},
Conflict {
message: String,
},
Forbidden {
message: String,
},
BadRequest {
message: String,
},
Http {
status: StatusCode,
message: String,
},
Transport {
message: String,
},
}Expand description
Structured error returned by the knowledge-store APIs.
Variants§
NotFound
Resource does not exist (HTTP 404).
Conflict
Resource already exists (HTTP 409).
Forbidden
Caller is not authorized (HTTP 401 / 403).
BadRequest
Request was rejected by the server (HTTP 400).
Http
Catch-all for any other HTTP error status, plus the raw body.
Transport
Transport / serialization / IO failure (no HTTP status available).
Implementations§
Trait Implementations§
Source§impl Clone for KnowledgeApiError
impl Clone for KnowledgeApiError
Source§fn clone(&self) -> KnowledgeApiError
fn clone(&self) -> KnowledgeApiError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KnowledgeApiError
impl Debug for KnowledgeApiError
Source§impl Display for KnowledgeApiError
impl Display for KnowledgeApiError
Source§impl Error for KnowledgeApiError
impl Error for KnowledgeApiError
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()
Auto Trait Implementations§
impl Freeze for KnowledgeApiError
impl RefUnwindSafe for KnowledgeApiError
impl Send for KnowledgeApiError
impl Sync for KnowledgeApiError
impl Unpin for KnowledgeApiError
impl UnsafeUnpin for KnowledgeApiError
impl UnwindSafe for KnowledgeApiError
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<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request