pub struct ResponseContentType { /* private fields */ }Expand description
Owned, bounded content type captured from an HTTP response.
Implementations§
Source§impl ResponseContentType
impl ResponseContentType
Sourcepub fn new(value: &str) -> Result<Self, ContentTypeError>
pub fn new(value: &str) -> Result<Self, ContentTypeError>
Validates and copies one response header value into bounded storage.
Sourcepub fn as_content_type(&self) -> ContentType<'_>
pub fn as_content_type(&self) -> ContentType<'_>
Returns the validated borrowed view.
Trait Implementations§
Source§impl Clone for ResponseContentType
impl Clone for ResponseContentType
Source§fn clone(&self) -> ResponseContentType
fn clone(&self) -> ResponseContentType
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 ResponseContentType
Source§impl Debug for ResponseContentType
impl Debug for ResponseContentType
impl Eq for ResponseContentType
Source§impl PartialEq for ResponseContentType
impl PartialEq for ResponseContentType
impl StructuralPartialEq for ResponseContentType
Auto Trait Implementations§
impl Freeze for ResponseContentType
impl RefUnwindSafe for ResponseContentType
impl Send for ResponseContentType
impl Sync for ResponseContentType
impl Unpin for ResponseContentType
impl UnsafeUnpin for ResponseContentType
impl UnwindSafe for ResponseContentType
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