pub enum Error {
Problem(Problem),
TermsNotAgreed,
KeyChangeConflict {
holder: Uuid,
},
}Expand description
The error an OrderService or
AccountService operation returns.
Most refusals are protocol answers the client is owed verbatim — the type,
the status and a detail several test suites pin byte for byte — and those
travel as the Problem they already are. Problem is a data type as much
as a response: the documents stored in challenges.error and orders.error
are its RFC 7807 JSON, and only its IntoResponse impl belongs to the HTTP
edge. Rebuilding every ACME error type here as a variant would be a second
definition of each, free to drift from the first.
The other two variants exist because the HTTP edge needs data a problem
document cannot carry: the Link to the terms of service, and the
Location of the account already holding a key. Each still maps to the
problem an ACME client would have seen, through From<Error> for Problem.
Variants§
Problem(Problem)
A refusal the client reads as it is.
TermsNotAgreed
newAccount without agreeing to the configured terms (RFC 8555 §7.3.3).
Its response carries a Link to the terms, which a problem document
cannot.
KeyChangeConflict
keyChange onto a key another account holds (RFC 8555 §7.3.5). Its
response carries that account’s Location.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more