[−][src]Struct pixieve_rs::pixiv::request::PixivRequest
PixivClient request. You can create this using PixivRequestBuilder::build
. This is for if you wish to inspect the request before sending.
Fields
method: Method
url: Uri
headers: HeaderMap
params: HashMap<&'static str, String>
form: HashMap<&'static str, String>
Implementations
impl PixivRequest
[src]
TODO: Consider replacing all the variations of adding stuff to a Trait
pub fn new(method: Method, url: Uri) -> PixivRequest
[src]
Create a new PixivRequest
.
A PixivRequest
is returned when calling build()
on PixivRequestBuilder
, so it is recommended you use that instead.
pub fn add_header<T, U>(self, key: T, val: U) -> Self where
T: Into<HeaderName>,
U: Into<HeaderValue>,
[src]
T: Into<HeaderName>,
U: Into<HeaderValue>,
Add header to the request
pub fn add_header_str<'a, T>(self, key: T, val: &'a str) -> Self where
T: Into<HeaderName>,
[src]
T: Into<HeaderName>,
Add header to the request TODO: Propagate this error.
pub fn add_param<U>(self, key: &'static str, val: U) -> Self where
U: Into<String>,
[src]
U: Into<String>,
Add header to the request
pub fn maybe_add_param<U>(self, key: &'static str, val: Option<U>) -> Self where
U: Into<String>,
[src]
U: Into<String>,
Add header to the request
pub fn add_param_from_str(self, key: &'static str, val: &'static str) -> Self
[src]
Add header to the request TODO: Propagate this error.
pub fn add_form<T>(self, key: &'static str, val: T) -> Self where
T: Into<String>,
[src]
T: Into<String>,
Add form data to the request
pub fn add_form_from_str(self, key: &'static str, val: &'static str) -> Self
[src]
Add form data to the request
pub fn finish(self) -> Self
[src]
TODO: Propagate this error.
TODO: This should return the actual Request and called from a Builder.
Sets query using serde_urlencoded
Trait Implementations
impl Clone for PixivRequest
[src]
fn clone(&self) -> PixivRequest
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PixivRequest
[src]
Auto Trait Implementations
impl RefUnwindSafe for PixivRequest
impl Send for PixivRequest
impl Sync for PixivRequest
impl Unpin for PixivRequest
impl UnwindSafe for PixivRequest
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,