pub struct HttpResponse {
pub version: String,
pub status: u16,
pub status_text: String,
pub headers: HashMap<String, String>,
pub body: Vec<u8>,
}Expand description
HTTP 响应
Fields§
§version: StringHTTP 版本
status: u16状态码
status_text: String状态文本
headers: HashMap<String, String>响应头
body: Vec<u8>响应体
Implementations§
Source§impl HttpResponse
impl HttpResponse
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpResponse
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin for HttpResponse
impl UnsafeUnpin 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