Struct digitalocean::request::Request
[−]
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,
A: Method,
fn url_mut(&mut self) -> &mut Url
fn body_mut(&mut self) -> &mut Value
The JSON body of the request.
impl<A, R> Request<A, R> where
A: Method,
A: Method,
impl<A, R> Request<A, R> where
A: Method,
A: Method,
impl<A, V> Request<A, V> where
A: Method,
A: Method,
fn new(url: Url) -> Self
Create a request pointing at the given url. V
is the value ultimately
returned when the call is executed.
impl<V> Request<List, V>
fn limit(self, limit: Option<usize>) -> Self
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,
A: Method,
impl<A: Clone, R: Clone> Clone for Request<A, R> where
A: Method,
A: Method,
fn clone(&self) -> Request<A, R>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
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,
Vec<V>: HasResponse,
<Vec<V> as HasResponse>::Response: HasPagination,
fn execute(self, instance: &DigitalOcean) -> Result<Vec<V>, Error>
Execute the corresponding call.
impl<V> Executable<V> for Request<Create, V> where
V: HasResponse,
V: HasResponse,
fn execute(self, instance: &DigitalOcean) -> Result<V, Error>
Execute the corresponding call.
impl<V> Executable<V> for Request<Update, V> where
V: HasResponse,
V: HasResponse,
fn execute(self, instance: &DigitalOcean) -> Result<V, Error>
Execute the corresponding call.
impl<V> Executable<V> for Request<Get, V> where
V: HasResponse,
V: HasResponse,
fn execute(self, instance: &DigitalOcean) -> Result<V, Error>
Execute the corresponding call.
impl Executable<()> for Request<Delete, ()>
fn execute(self, instance: &DigitalOcean) -> Result<(), Error>
Execute the corresponding call.