pub struct Response { /* private fields */ }
Implementations§
Source§impl Response
impl Response
pub fn new() -> Self
pub fn status_code(&self) -> &Option<usize>
pub fn status_message(&self) -> &Option<String>
pub fn version(&self) -> &Option<String>
pub fn headers(&self) -> &HashMap<String, String>
pub fn header<N: Into<String>>(&self, name: N) -> Option<&String>
pub fn length(&self) -> usize
pub fn length_limit(&self) -> Option<usize>
pub fn lines(&self) -> &Vec<String>
pub fn has_status_code(&self) -> bool
pub fn has_status_message(&self) -> bool
pub fn has_version(&self) -> bool
pub fn has_headers(&self) -> bool
pub fn has_header<N: Into<String>>(&self, name: N) -> bool
pub fn has_length_limit(&self) -> bool
pub fn set_status_code(&mut self, value: usize)
pub fn set_status_message<V: Into<String>>(&mut self, value: V)
pub fn set_version<V: Into<String>>(&mut self, value: V)
pub fn set_header<N: Into<String>, V: Into<String>>( &mut self, name: N, value: V, )
pub fn set_length_limit(&mut self, limit: usize)
pub fn remove_status_code(&mut self)
pub fn remove_status_message(&mut self)
pub fn remove_version<V: Into<String>>(&mut self)
pub fn remove_header<N: Into<String>>(&mut self, name: N)
pub fn remove_length_limit(&mut self)
pub async fn read<I>(&mut self, stream: &mut I) -> Result<usize, Error>
pub async fn write<I>(&mut self, stream: &mut I) -> Result<usize, Error>
pub fn clear(&mut self)
pub fn parse_head(&mut self) -> Result<(), Error>
pub fn parse_headers(&mut self) -> Result<(), Error>
pub fn build_head(&mut self) -> Result<(), Error>
pub fn build_headers(&mut self) -> Result<(), Error>
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_string(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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