pub struct Request<'a> { /* private fields */ }Implementations§
Source§impl<'a> Request<'a>
impl<'a> Request<'a>
pub fn new(url: &'a str) -> Self
pub fn with_logging(self, logging: bool) -> Self
pub fn with_method(self, method: Method) -> Self
pub fn with_header(self, name: &'static str, value: impl ToSmolStr) -> Self
pub fn with_headers(self, headers: Option<Vec<(&'static str, SmolStr)>>) -> Self
pub fn with_media_type(self, media_type: MediaType) -> Self
pub fn with_body(self, body: Vec<u8>) -> Self
pub fn with_file(self, file: File) -> Self
pub fn with_is_load(self, is_load: bool) -> Self
pub fn with_timeout(self, timeout: Option<Duration>) -> Self
pub fn encoding(self, media_type: impl Into<MediaType>) -> Self
pub fn encoding_with_response(self, media_type: impl Into<MediaType>) -> Self
pub fn json(self) -> Self
pub fn json_with_response(self) -> Self
pub fn postcard(self) -> Self
pub fn postcard_with_response(self) -> Self
pub fn create(self) -> Self
pub fn retrieve(self) -> Self
pub fn update(self) -> Self
pub fn delete(self) -> Self
pub fn execute(self) -> Self
pub fn logging(&self) -> bool
pub fn method(&self) -> &Method
pub fn is_load(&self) -> bool
pub fn url(&self) -> &str
pub fn media_type(&self) -> Option<MediaType>
pub fn headers(&self) -> Option<&[(&'static str, SmolStr)]>
pub fn wants_response(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Request<'a>
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> Send for Request<'a>
impl<'a> Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> UnwindSafe for Request<'a>
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