pub struct Request { /* private fields */ }
Implementations§
Source§impl Request
impl Request
pub fn default() -> Self
pub fn parse_url<U>(url: U) -> Result<Self, Error>
pub fn url(&self) -> &Url
pub fn method(&self) -> &Method
pub fn version(&self) -> &Version
pub fn headers(&self) -> &HashMap<String, String>
pub fn header<N: Into<String>>(&self, name: N) -> Option<&String>
pub fn relay(&self) -> &Option<String>
pub fn body_limit(&self) -> &Option<usize>
pub fn headers_mut(&mut self) -> &mut HashMap<String, String>
pub fn has_method(&self, value: Method) -> bool
pub fn has_version(&self, value: Version) -> bool
pub fn has_header<N: Into<String>>(&self, name: N) -> bool
pub fn has_body_limit(&self) -> bool
pub fn set_url(&mut self, value: Url)
pub fn set_url_str<V: Into<String>>(&mut self, value: V) -> Result<(), Error>
pub fn set_method(&mut self, value: Method)
pub fn set_method_str(&mut self, value: &str) -> Result<(), Error>
pub fn set_version(&mut self, value: Version)
pub fn set_version_str(&mut self, value: &str) -> Result<(), Error>
pub fn set_header<N: Into<String>, V: Into<String>>( &mut self, name: N, value: V, )
pub fn set_relay<V: Into<String>>(&mut self, value: V)
pub fn set_body_limit(&mut self, length: usize)
pub fn remove_header<N: Into<String>>(&mut self, name: N)
pub fn remove_relay(&mut self)
pub fn clear_headers(&mut self)
pub fn to_proto_string(&self) -> String
pub async fn send<'a>(&mut self) -> Result<Response<'a>, Error>
pub async fn send_stream<'a, R>( &mut self, body: &mut R, ) -> Result<Response<'a>, Error>
pub async fn send_slice<'a>( &mut self, body: &[u8], ) -> Result<Response<'a>, Error>
pub async fn send_str<'a>(&mut self, body: &str) -> Result<Response<'a>, Error>
pub async fn send_http<'a, R>( &mut self, body: &mut R, ) -> Result<Response<'a>, Error>
pub async fn send_https<'a, R>( &mut self, body: &mut R, ) -> Result<Response<'a>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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