pub struct CommonApiError {
pub kind: CommonErrorKind,
pub msg: String,
}Expand description
Errors common to all ApiErrors.
- This is an intermediate error type which should only be used in API
library code (e.g.
RestClient,lexe_api::server) which cannot assume a specific API error type. ApiErrors andApiErrorKinds must implFrom<CommonApiError>andFrom<CommonErrorKind>respectively to ensure all cases are covered.
Fields§
§kind: CommonErrorKind§msg: StringImplementations§
Source§impl CommonApiError
impl CommonApiError
pub fn new(kind: CommonErrorKind, msg: String) -> CommonApiError
pub fn to_code(&self) -> u16
Trait Implementations§
Source§impl Display for CommonApiError
impl Display for CommonApiError
Source§impl From<CommonApiError> for BackendApiError
impl From<CommonApiError> for BackendApiError
Source§fn from(common_error: CommonApiError) -> BackendApiError
fn from(common_error: CommonApiError) -> BackendApiError
Converts to this type from the input type.
Source§impl From<CommonApiError> for ErrorResponse
impl From<CommonApiError> for ErrorResponse
Source§fn from(_: CommonApiError) -> ErrorResponse
fn from(_: CommonApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl From<CommonApiError> for GatewayApiError
impl From<CommonApiError> for GatewayApiError
Source§fn from(common_error: CommonApiError) -> GatewayApiError
fn from(common_error: CommonApiError) -> GatewayApiError
Converts to this type from the input type.
Source§impl From<CommonApiError> for LspApiError
impl From<CommonApiError> for LspApiError
Source§fn from(common_error: CommonApiError) -> LspApiError
fn from(common_error: CommonApiError) -> LspApiError
Converts to this type from the input type.
Source§impl From<CommonApiError> for MegaApiError
impl From<CommonApiError> for MegaApiError
Source§fn from(common_error: CommonApiError) -> MegaApiError
fn from(common_error: CommonApiError) -> MegaApiError
Converts to this type from the input type.
Source§impl From<CommonApiError> for NodeApiError
impl From<CommonApiError> for NodeApiError
Source§fn from(common_error: CommonApiError) -> NodeApiError
fn from(common_error: CommonApiError) -> NodeApiError
Converts to this type from the input type.
Source§impl From<CommonApiError> for RunnerApiError
impl From<CommonApiError> for RunnerApiError
Source§fn from(common_error: CommonApiError) -> RunnerApiError
fn from(common_error: CommonApiError) -> RunnerApiError
Converts to this type from the input type.
Source§impl From<CommonApiError> for SdkApiError
impl From<CommonApiError> for SdkApiError
Source§fn from(common_error: CommonApiError) -> SdkApiError
fn from(common_error: CommonApiError) -> SdkApiError
Converts to this type from the input type.
Source§impl From<Error> for CommonApiError
impl From<Error> for CommonApiError
Source§fn from(err: Error) -> CommonApiError
fn from(err: Error) -> CommonApiError
Converts to this type from the input type.
Source§impl From<Error> for CommonApiError
Available on crate feature reqwest only.
impl From<Error> for CommonApiError
Available on crate feature
reqwest only.Source§fn from(err: Error) -> CommonApiError
fn from(err: Error) -> CommonApiError
Converts to this type from the input type.
Source§impl IntoResponse for CommonApiError
Available on crate feature axum only.
impl IntoResponse for CommonApiError
Available on crate feature
axum only.Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Auto Trait Implementations§
impl Freeze for CommonApiError
impl RefUnwindSafe for CommonApiError
impl Send for CommonApiError
impl Sync for CommonApiError
impl Unpin for CommonApiError
impl UnsafeUnpin for CommonApiError
impl UnwindSafe for CommonApiError
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.