pub struct HttpData {Show 14 fields
pub content_length: Option<u64>,
pub content_type: Option<String>,
pub scheme: Option<String>,
pub host: String,
pub expires: Option<String>,
pub cache_control: Option<String>,
pub received: DateTime<Utc>,
pub status_code: u16,
pub location: Option<String>,
pub access_control_allow_origin: Option<String>,
pub access_control_allow_credentials: Option<String>,
pub strict_transport_security: Option<String>,
pub retry_after: Option<String>,
pub request_uri: Option<String>,
}Expand description
Represents the data from HTTP responses.
Fields§
§content_length: Option<u64>§content_type: Option<String>§scheme: Option<String>§host: String§expires: Option<String>§cache_control: Option<String>§received: DateTime<Utc>§status_code: u16§location: Option<String>§access_control_allow_origin: Option<String>§access_control_allow_credentials: Option<String>§strict_transport_security: Option<String>§retry_after: Option<String>§request_uri: Option<String>Implementations§
Source§impl HttpData
impl HttpData
pub fn is_expired(&self, max_age: i64) -> bool
pub fn should_cache(&self) -> bool
pub fn from_lines(lines: &[String]) -> Result<(Self, &[String]), Error>
pub fn to_lines(&self, data: &str) -> Result<String, Error>
pub fn content_length(&self) -> Option<u64>
pub fn content_type(&self) -> Option<&str>
pub fn scheme(&self) -> Option<&str>
pub fn host(&self) -> &str
pub fn expires(&self) -> Option<&str>
pub fn cache_control(&self) -> Option<&str>
pub fn received(&self) -> &DateTime<Utc>
pub fn status_code(&self) -> u16
pub fn location(&self) -> Option<&str>
pub fn access_control_allow_origin(&self) -> Option<&str>
pub fn access_control_allow_credentials(&self) -> Option<&str>
pub fn strict_transport_security(&self) -> Option<&str>
pub fn retry_after(&self) -> Option<&str>
pub fn request_uri(&self) -> Option<&str>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HttpData
impl<'de> Deserialize<'de> for HttpData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl GetChecks for HttpData
impl GetChecks for HttpData
fn get_checks(&self, index: Option<usize>, params: CheckParams<'_>) -> Checks
impl Eq for HttpData
impl StructuralPartialEq for HttpData
Auto Trait Implementations§
impl Freeze for HttpData
impl RefUnwindSafe for HttpData
impl Send for HttpData
impl Sync for HttpData
impl Unpin for HttpData
impl UnsafeUnpin for HttpData
impl UnwindSafe for HttpData
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