Enum discord_flows::http::LightMethod
source · pub enum LightMethod {
Delete,
Get,
Patch,
Post,
Put,
}Expand description
This trait will be required by functions that need Http and can
optionally use a [Cache] to potentially avoid REST-requests.
The types [Context] and Http implement this trait
and thus passing these to functions expecting impl CacheHttp is possible. For the full list
of implementations, see the Implementors and Implementations on Foreign Types section in the
generated docs.
In a situation where you have the cache-feature enabled but you do not
pass a cache, the function will behave as if no cache-feature is active.
If you are calling a function that expects impl CacheHttp as argument
and you wish to utilise the cache-feature but you got no access to a
[Context], you can pass a tuple of (&Arc<Cache>, &Http).
An method used for ratelimiting special routes.
This is needed because [reqwest]’s Method enum does not derive Copy.
Variants§
Delete
Indicates that a route is for the DELETE method only.
Get
Indicates that a route is for the GET method only.
Patch
Indicates that a route is for the PATCH method only.
Post
Indicates that a route is for the POST method only.
Put
Indicates that a route is for the PUT method only.
Implementations§
source§impl LightMethod
impl LightMethod
pub fn reqwest_method(self) -> Method
Trait Implementations§
source§impl Clone for LightMethod
impl Clone for LightMethod
source§fn clone(&self) -> LightMethod
fn clone(&self) -> LightMethod
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for LightMethod
impl Debug for LightMethod
source§impl Hash for LightMethod
impl Hash for LightMethod
source§impl PartialEq<LightMethod> for LightMethod
impl PartialEq<LightMethod> for LightMethod
source§fn eq(&self, other: &LightMethod) -> bool
fn eq(&self, other: &LightMethod) -> bool
self and other values to be equal, and is used
by ==.