pub enum ResponsePolicyValidationError {
MissingSuccessStatus,
NonSuccessStatus,
DuplicateSuccessStatus,
MissingAcceptedMediaType,
DuplicateAcceptedMediaType,
RequiredBodyHasZeroLimit,
ForbiddenBodyHasNonzeroLimit,
ForbiddenBodyAllowsContentType,
RequiredBodyForbidsContentType,
}Expand description
Invalid response-policy construction.
Variants§
MissingSuccessStatus
At least one success status is required.
NonSuccessStatus
Expected success statuses must be in the HTTP 2xx range.
DuplicateSuccessStatus
Expected success statuses must not contain duplicates.
MissingAcceptedMediaType
Required or optional content-type policy needs accepted media types.
DuplicateAcceptedMediaType
Accepted media types must not contain duplicates.
RequiredBodyHasZeroLimit
Required response bodies need a nonzero maximum length.
ForbiddenBodyHasNonzeroLimit
Forbidden response bodies require a zero maximum length.
ForbiddenBodyAllowsContentType
A forbidden body cannot require or optionally accept a content type.
RequiredBodyForbidsContentType
A required body cannot forbid its content type.
Trait Implementations§
Source§impl Clone for ResponsePolicyValidationError
impl Clone for ResponsePolicyValidationError
Source§fn clone(&self) -> ResponsePolicyValidationError
fn clone(&self) -> ResponsePolicyValidationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResponsePolicyValidationError
impl Eq for ResponsePolicyValidationError
Source§impl Error for ResponsePolicyValidationError
impl Error for ResponsePolicyValidationError
1.30.0 · 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()
impl StructuralPartialEq for ResponsePolicyValidationError
Auto Trait Implementations§
impl Freeze for ResponsePolicyValidationError
impl RefUnwindSafe for ResponsePolicyValidationError
impl Send for ResponsePolicyValidationError
impl Sync for ResponsePolicyValidationError
impl Unpin for ResponsePolicyValidationError
impl UnsafeUnpin for ResponsePolicyValidationError
impl UnwindSafe for ResponsePolicyValidationError
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