#[non_exhaustive]pub enum ClientContractError {
Show 13 variants
InvalidVersion,
InvalidRequestId,
InvalidIdempotencyKey,
InvalidFailureCode,
EmptyVersionOffer,
TooManyOfferedVersions,
InvalidPolicy,
NoMutualVersion,
UnsupportedVersion {
received: u16,
minimum: u16,
current: u16,
},
MissingIdempotencyKey,
BodyTooLarge {
maximum: usize,
},
InvalidJson(Error),
EncodeJson(Error),
}Expand description
Fail-closed client-contract validation or codec error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidVersion
Wire versions must be positive.
InvalidRequestId
Request identifiers must satisfy the bounded token grammar.
InvalidIdempotencyKey
Mutation replay keys must satisfy the bounded token grammar.
InvalidFailureCode
Failure codes must use the stable dotted grammar.
EmptyVersionOffer
A negotiation offer contained no version.
TooManyOfferedVersions
A negotiation offer exceeded its structural bound.
InvalidPolicy
Server policy range or body limit is invalid.
NoMutualVersion
Client and server share no supported version.
UnsupportedVersion
A request or response selected a version outside server policy.
Fields
MissingIdempotencyKey
A state-changing request omitted its replay key.
BodyTooLarge
Encoded content exceeded the policy ceiling.
InvalidJson(Error)
Incoming JSON did not satisfy the typed envelope.
EncodeJson(Error)
A typed response could not be serialized.
Trait Implementations§
Source§impl Debug for ClientContractError
impl Debug for ClientContractError
Source§impl Display for ClientContractError
impl Display for ClientContractError
Source§impl Error for ClientContractError
impl Error for ClientContractError
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 !RefUnwindSafe for ClientContractError
impl !UnwindSafe for ClientContractError
impl Freeze for ClientContractError
impl Send for ClientContractError
impl Sync for ClientContractError
impl Unpin for ClientContractError
impl UnsafeUnpin for ClientContractError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP