pub struct HTTPResponse { /* private fields */ }Implementations§
Source§impl HTTPResponse
impl HTTPResponse
pub fn new(msg: &str, status_code: u32, body: &[u8]) -> Self
Sourcepub fn add_header(&mut self, key: &str, value: &str)
pub fn add_header(&mut self, key: &str, value: &str)
Adds a header to the request, if the header already exists, it replaces it
pub fn get_body(&self) -> Vec<u8> ⓘ
pub fn get_headers(&self) -> Vec<(String, String)>
pub fn has_header(&self, key: &str) -> bool
pub fn get_msg(&self) -> String
pub fn get_code(&self) -> u32
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 moreAuto 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