Struct digitalocean::request::Request
[−]
[src]
pub struct Request<A, R> where
A: Method, { /* fields omitted */ }
A consuming builder which can be used to build up API calls.
In general consumers of the crate should not need to use this type directly.
Instead, build up requests from what is found in api::*
.
Methods
impl<A, R> Request<A, R> where
A: Method,
[src]
A: Method,
fn url_mut(&mut self) -> &mut Url
[src]
fn body_mut(&mut self) -> &mut Value
[src]
The JSON body of the request.
impl<A, R> Request<A, R> where
A: Method,
[src]
A: Method,
fn url(&self) -> &Url
[src]
fn body(&self) -> &Value
[src]
The JSON body of the request.
fn method(&self) -> &A
[src]
impl<A, R> Request<A, R> where
A: Method,
[src]
A: Method,
fn set_url(&mut self, val: Url)
[src]
fn set_body(&mut self, val: Value)
[src]
The JSON body of the request.
impl<A, V> Request<A, V> where
A: Method,
[src]
A: Method,
fn new(url: Url) -> Self
[src]
Create a request pointing at the given url. V
is the value ultimately
returned when the call is executed.
impl<V> Request<List, V>
[src]
fn limit(self, limit: Option<usize>) -> Self
[src]
Impose a limit on the number of values which may be retrieved from a request.
Trait Implementations
impl<A: Debug, R: Debug> Debug for Request<A, R> where
A: Method,
[src]
A: Method,
impl<A: Clone, R: Clone> Clone for Request<A, R> where
A: Method,
[src]
A: Method,
fn clone(&self) -> Request<A, R>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<V> Executable<Vec<V>> for Request<List, Vec<V>> where
Vec<V>: HasResponse,
<Vec<V> as HasResponse>::Response: HasPagination,
[src]
Vec<V>: HasResponse,
<Vec<V> as HasResponse>::Response: HasPagination,
fn execute(self, instance: &DigitalOcean) -> Result<Vec<V>, Error>
[src]
Execute the corresponding call.
impl<V> Executable<V> for Request<Create, V> where
V: HasResponse,
[src]
V: HasResponse,
fn execute(self, instance: &DigitalOcean) -> Result<V, Error>
[src]
Execute the corresponding call.
impl<V> Executable<V> for Request<Update, V> where
V: HasResponse,
[src]
V: HasResponse,
fn execute(self, instance: &DigitalOcean) -> Result<V, Error>
[src]
Execute the corresponding call.
impl<V> Executable<V> for Request<Get, V> where
V: HasResponse,
[src]
V: HasResponse,
fn execute(self, instance: &DigitalOcean) -> Result<V, Error>
[src]
Execute the corresponding call.