pub struct ApiError {
pub status: StatusCode,
pub code: &'static str,
pub title: String,
pub generation: Option<Generation>,
pub balance_exhaustion: Option<BalanceExhaustion>,
pub balance_shortfall: Option<BalanceShortfall>,
}Fields§
§status: StatusCode§code: &'static str§title: String§generation: Option<Generation>§balance_exhaustion: Option<BalanceExhaustion>§balance_shortfall: Option<BalanceShortfall>Implementations§
Source§impl ApiError
impl ApiError
pub fn forbidden() -> Self
pub fn not_found(code: &'static str, title: impl Into<String>) -> Self
pub fn revoked(generation: Generation) -> Self
pub fn bad_request(code: &'static str, title: impl Into<String>) -> Self
Sourcepub fn not_implemented(code: &'static str, title: impl Into<String>) -> Self
pub fn not_implemented(code: &'static str, title: impl Into<String>) -> Self
The backend cannot answer this at all, as opposed to answering “nothing” — a distinction a caller must be able to act on differently (GL-48).
Trait Implementations§
Source§impl From<AllocateError> for ApiError
impl From<AllocateError> for ApiError
Source§fn from(e: AllocateError) -> Self
fn from(e: AllocateError) -> Self
Converts to this type from the input type.
Source§impl From<BudgetError> for ApiError
impl From<BudgetError> for ApiError
Source§fn from(e: BudgetError) -> Self
fn from(e: BudgetError) -> Self
Converts to this type from the input type.
Source§impl From<CreateAccountError> for ApiError
impl From<CreateAccountError> for ApiError
Source§fn from(e: CreateAccountError) -> Self
fn from(e: CreateAccountError) -> Self
Converts to this type from the input type.
Source§impl From<IngestError> for ApiError
impl From<IngestError> for ApiError
Source§fn from(error: IngestError) -> Self
fn from(error: IngestError) -> Self
Converts to this type from the input type.
Source§impl From<JsonRejection> for ApiError
impl From<JsonRejection> for ApiError
Source§fn from(error: JsonRejection) -> Self
fn from(error: JsonRejection) -> Self
Converts to this type from the input type.
Source§impl From<KeySnapshotError> for ApiError
impl From<KeySnapshotError> for ApiError
Source§fn from(e: KeySnapshotError) -> Self
fn from(e: KeySnapshotError) -> Self
Converts to this type from the input type.
Source§impl From<PathRejection> for ApiError
impl From<PathRejection> for ApiError
Source§fn from(error: PathRejection) -> Self
fn from(error: PathRejection) -> Self
Converts to this type from the input type.
Source§impl From<PublishSnapshotError> for ApiError
impl From<PublishSnapshotError> for ApiError
Source§fn from(e: PublishSnapshotError) -> Self
fn from(e: PublishSnapshotError) -> Self
Converts to this type from the input type.
Source§impl From<SetStatusError> for ApiError
impl From<SetStatusError> for ApiError
Source§fn from(e: SetStatusError) -> Self
fn from(e: SetStatusError) -> Self
Converts to this type from the input type.
Source§impl From<SnapshotValidationError> for ApiError
impl From<SnapshotValidationError> for ApiError
Source§fn from(error: SnapshotValidationError) -> Self
fn from(error: SnapshotValidationError) -> Self
Converts to this type from the input type.
Source§impl From<StoreError> for ApiError
impl From<StoreError> for ApiError
Source§fn from(_: StoreError) -> Self
fn from(_: StoreError) -> Self
Converts to this type from the input type.
Source§impl IntoResponse for ApiError
impl IntoResponse for ApiError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for ApiError
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
impl UnwindSafe for ApiError
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