pub struct ApiKeyError {
pub kind: ApiKeyErrorKind,
pub location: ApiKeyLocation,
pub name: String,
}Expand description
Error when API key extraction fails.
Fields§
§kind: ApiKeyErrorKindThe kind of error.
location: ApiKeyLocationLocation where the key was expected.
name: StringName of the expected key.
Implementations§
Source§impl ApiKeyError
impl ApiKeyError
Sourcepub fn missing(location: ApiKeyLocation, name: impl Into<String>) -> Self
pub fn missing(location: ApiKeyLocation, name: impl Into<String>) -> Self
Create a missing key error.
Sourcepub fn empty(location: ApiKeyLocation, name: impl Into<String>) -> Self
pub fn empty(location: ApiKeyLocation, name: impl Into<String>) -> Self
Create an empty key error.
Trait Implementations§
Source§impl Clone for ApiKeyError
impl Clone for ApiKeyError
Source§fn clone(&self) -> ApiKeyError
fn clone(&self) -> ApiKeyError
Returns a duplicate of the value. Read more
1.0.0 · 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 ApiKeyError
impl Debug for ApiKeyError
Source§impl Display for ApiKeyError
impl Display for ApiKeyError
Source§impl IntoResponse for ApiKeyError
impl IntoResponse for ApiKeyError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Convert into a response.
Auto Trait Implementations§
impl Freeze for ApiKeyError
impl RefUnwindSafe for ApiKeyError
impl Send for ApiKeyError
impl Sync for ApiKeyError
impl Unpin for ApiKeyError
impl UnwindSafe for ApiKeyError
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).