Enum fire_http::header::ContentType
source · Expand description
Http ContentType header.
Variants
Implementations
sourceimpl ContentType
impl ContentType
pub fn as_str(&self) -> &str
pub fn from_extension(e: &str) -> Option<ContentType>
Trait Implementations
sourceimpl Clone for ContentType
impl Clone for ContentType
sourcefn clone(&self) -> ContentType
fn clone(&self) -> ContentType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ContentType
impl Debug for ContentType
sourceimpl Display for ContentType
impl Display for ContentType
sourceimpl<'a> From<&'a str> for ContentType
impl<'a> From<&'a str> for ContentType
sourcefn from(s: &'a str) -> ContentType
fn from(s: &'a str) -> ContentType
Converts to this type from the input type.
sourceimpl From<()> for ContentType
impl From<()> for ContentType
sourcefn from(_: ()) -> ContentType
fn from(_: ()) -> ContentType
Converts to this type from the input type.
sourceimpl From<Mime> for ContentType
impl From<Mime> for ContentType
sourcefn from(m: Mime) -> ContentType
fn from(m: Mime) -> ContentType
Converts to this type from the input type.
sourceimpl From<String> for ContentType
impl From<String> for ContentType
sourcefn from(s: String) -> ContentType
fn from(s: String) -> ContentType
Converts to this type from the input type.
sourceimpl PartialEq<ContentType> for ContentType
impl PartialEq<ContentType> for ContentType
sourcefn eq(&self, other: &ContentType) -> bool
fn eq(&self, other: &ContentType) -> bool
sourceimpl TryFrom<ContentType> for HeaderValue
impl TryFrom<ContentType> for HeaderValue
type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
sourcefn try_from(
ct: ContentType
) -> Result<HeaderValue, <HeaderValue as TryFrom<ContentType>>::Error>
fn try_from(
ct: ContentType
) -> Result<HeaderValue, <HeaderValue as TryFrom<ContentType>>::Error>
Performs the conversion.
impl Eq for ContentType
impl StructuralEq for ContentType
impl StructuralPartialEq for ContentType
Auto Trait Implementations
impl RefUnwindSafe for ContentType
impl Send for ContentType
impl Sync for ContentType
impl Unpin for ContentType
impl UnwindSafe for ContentType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.