pub enum ContentTypePolicy {
Required(&'static [MediaType<'static>]),
Optional(&'static [MediaType<'static>]),
Forbidden,
}Expand description
Response content-type requirement and accepted media types.
Variants§
Required(&'static [MediaType<'static>])
A content type is required and must match one accepted media type.
Optional(&'static [MediaType<'static>])
A content type may be absent, but when present it must match.
Forbidden
Any response content type is rejected.
Trait Implementations§
Source§impl Clone for ContentTypePolicy
impl Clone for ContentTypePolicy
Source§fn clone(&self) -> ContentTypePolicy
fn clone(&self) -> ContentTypePolicy
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 ContentTypePolicy
Source§impl Debug for ContentTypePolicy
impl Debug for ContentTypePolicy
impl Eq for ContentTypePolicy
Source§impl PartialEq for ContentTypePolicy
impl PartialEq for ContentTypePolicy
impl StructuralPartialEq for ContentTypePolicy
Auto Trait Implementations§
impl Freeze for ContentTypePolicy
impl RefUnwindSafe for ContentTypePolicy
impl Send for ContentTypePolicy
impl Sync for ContentTypePolicy
impl Unpin for ContentTypePolicy
impl UnsafeUnpin for ContentTypePolicy
impl UnwindSafe for ContentTypePolicy
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