pub struct HttpRequest<'a, T: 'a + AsRef<[u8]>, U: 'a + AsRef<str>> {
pub content: &'a T,
pub url: &'a U,
pub type_hint: &'a str,
}
Expand description
HTTP request with content, URL and MIME type hint.
Fields§
§content: &'a T
§url: &'a U
§type_hint: &'a str
Trait Implementations§
Source§impl<'a, T: 'a + AsRef<[u8]>> MimeTypeSniffable for HttpRequest<'a, T, Url>
impl<'a, T: 'a + AsRef<[u8]>> MimeTypeSniffable for HttpRequest<'a, T, Url>
Source§fn should_sniff_mime_type(&self) -> bool
fn should_sniff_mime_type(&self) -> bool
should we sniff content
Source§impl<'a, T: 'a + AsRef<[u8]>, U: 'a + AsRef<str>> MimeTypeSniffer for HttpRequest<'a, T, U>
impl<'a, T: 'a + AsRef<[u8]>, U: 'a + AsRef<str>> MimeTypeSniffer for HttpRequest<'a, T, U>
Source§fn sniff_mime_type(&self) -> Option<&str>
fn sniff_mime_type(&self) -> Option<&str>
sniff content for MIME type
Auto Trait Implementations§
impl<'a, T, U> Freeze for HttpRequest<'a, T, U>
impl<'a, T, U> RefUnwindSafe for HttpRequest<'a, T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<'a, T, U> Send for HttpRequest<'a, T, U>
impl<'a, T, U> Sync for HttpRequest<'a, T, U>
impl<'a, T, U> Unpin for HttpRequest<'a, T, U>
impl<'a, T, U> UnwindSafe for HttpRequest<'a, T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
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
Source§impl<T> MimeTypeSnifferExt for Twhere
T: MimeTypeSniffer,
impl<T> MimeTypeSnifferExt for Twhere
T: MimeTypeSniffer,
Source§fn sniff_mime_type_ext(&self) -> Option<Mime>
fn sniff_mime_type_ext(&self) -> Option<Mime>
sniff content for MIME type