pub struct FeedHttpResponse {
pub status: u16,
pub url: String,
pub headers: HashMap<String, String>,
pub body: Vec<u8>,
pub etag: Option<String>,
pub last_modified: Option<String>,
pub content_type: Option<String>,
pub encoding: Option<String>,
}Expand description
HTTP response from feed fetch
Fields§
§status: u16HTTP status code
url: StringFinal URL after redirects
headers: HashMap<String, String>Response headers
body: Vec<u8>Response body
etag: Option<String>ETag header value
last_modified: Option<String>Last-Modified header value
content_type: Option<String>Content-Type header value
encoding: Option<String>Encoding extracted from Content-Type
Implementations§
Source§impl FeedHttpResponse
impl FeedHttpResponse
Sourcepub fn extract_charset_from_content_type(content_type: &str) -> Option<String>
pub fn extract_charset_from_content_type(content_type: &str) -> Option<String>
Extract charset from Content-Type header
Parses header like “text/xml; charset=utf-8” and returns “utf-8”
Trait Implementations§
Source§impl Clone for FeedHttpResponse
impl Clone for FeedHttpResponse
Source§fn clone(&self) -> FeedHttpResponse
fn clone(&self) -> FeedHttpResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FeedHttpResponse
impl RefUnwindSafe for FeedHttpResponse
impl Send for FeedHttpResponse
impl Sync for FeedHttpResponse
impl Unpin for FeedHttpResponse
impl UnwindSafe for FeedHttpResponse
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