pub struct HttpResponseInfo {
pub status_code: u16,
pub reason: String,
pub content_length: Option<usize>,
pub content_type: Option<String>,
pub chunked: bool,
pub headers: Headers,
}Expand description
Information extracted from HTTP response headers.
Fields§
§status_code: u16HTTP status code (e.g., 200, 404)
reason: StringReason phrase (e.g., “OK”, “Not Found”)
content_length: Option<usize>Content-Length if provided
content_type: Option<String>Content-Type if provided
chunked: boolWhether response uses chunked transfer encoding
headers: HeadersFull headers
Implementations§
Source§impl HttpResponseInfo
impl HttpResponseInfo
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if response indicates success (2xx).
Sourcepub fn is_redirect(&self) -> bool
pub fn is_redirect(&self) -> bool
Check if response indicates redirect (3xx).
Trait Implementations§
Source§impl Clone for HttpResponseInfo
impl Clone for HttpResponseInfo
Source§fn clone(&self) -> HttpResponseInfo
fn clone(&self) -> HttpResponseInfo
Returns a copy 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 HttpResponseInfo
impl RefUnwindSafe for HttpResponseInfo
impl Send for HttpResponseInfo
impl Sync for HttpResponseInfo
impl Unpin for HttpResponseInfo
impl UnwindSafe for HttpResponseInfo
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