pub struct HttpResponse {
pub code: i64,
pub content_type: Option<String>,
pub http_headers: Vec<HttpHeader>,
pub latency: Option<i64>,
pub length: Option<i64>,
pub message: Option<String>,
pub status: Option<String>,
}
Expand description
HttpResponse
JSON schema
{
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "integer"
},
"content_type": {
"type": "string"
},
"http_headers": {
"type": "array",
"items": {
"$ref": "#/$defs/http_header"
}
},
"latency": {
"type": "integer"
},
"length": {
"type": "integer"
},
"message": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
Fields§
§code: i64
§content_type: Option<String>
§http_headers: Vec<HttpHeader>
§latency: Option<i64>
§length: Option<i64>
§message: Option<String>
§status: Option<String>
Implementations§
Source§impl HttpResponse
impl HttpResponse
pub fn builder() -> HttpResponse
Trait Implementations§
Source§impl Clone for HttpResponse
impl Clone for HttpResponse
Source§fn clone(&self) -> HttpResponse
fn clone(&self) -> HttpResponse
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 moreSource§impl Debug for HttpResponse
impl Debug for HttpResponse
Source§impl<'de> Deserialize<'de> for HttpResponse
impl<'de> Deserialize<'de> for HttpResponse
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 From<&HttpResponse> for HttpResponse
impl From<&HttpResponse> for HttpResponse
Source§fn from(value: &HttpResponse) -> Self
fn from(value: &HttpResponse) -> Self
Converts to this type from the input type.
Source§impl From<HttpResponse> for HttpResponse
impl From<HttpResponse> for HttpResponse
Source§fn from(value: HttpResponse) -> Self
fn from(value: HttpResponse) -> Self
Converts to this type from the input type.
Source§impl Serialize for HttpResponse
impl Serialize for HttpResponse
Source§impl TryFrom<HttpResponse> for HttpResponse
impl TryFrom<HttpResponse> for HttpResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: HttpResponse) -> Result<Self, ConversionError>
fn try_from(value: HttpResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for HttpResponse
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin for HttpResponse
impl UnwindSafe for HttpResponse
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