#[repr(u8)]pub enum HttpMethod {
Get = 0,
Post = 1,
Put = 2,
Delete = 3,
Patch = 4,
Head = 5,
Options = 6,
Connect = 7,
Trace = 8,
}
Expand description
The HTTP method.
Variants§
Get = 0
The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
Post = 1
The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
Put = 2
The PUT method replaces all current representations of the target resource with the request payload.
Delete = 3
The DELETE method deletes the specified resource.
Patch = 4
The PATCH method is used to apply partial modifications to a resource.
Head = 5
The HEAD method asks for a response identical to that of a GET request, but without the response body.
Options = 6
The OPTIONS method is used to describe the communication options for the target resource.
Connect = 7
The CONNECT method establishes a tunnel to the server identified by the target resource.
Trace = 8
The TRACE method performs a message loop-back test along the path to the target resource.
Implementations§
Trait Implementations§
Source§impl Clone for HttpMethod
impl Clone for HttpMethod
Source§fn clone(&self) -> HttpMethod
fn clone(&self) -> HttpMethod
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for HttpMethod
impl Debug for HttpMethod
Source§impl Ord for HttpMethod
impl Ord for HttpMethod
Source§fn cmp(&self, other: &HttpMethod) -> Ordering
fn cmp(&self, other: &HttpMethod) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for HttpMethod
impl PartialEq for HttpMethod
Source§impl PartialOrd for HttpMethod
impl PartialOrd for HttpMethod
impl Copy for HttpMethod
impl Eq for HttpMethod
impl StructuralPartialEq for HttpMethod
Auto Trait Implementations§
impl Freeze for HttpMethod
impl RefUnwindSafe for HttpMethod
impl Send for HttpMethod
impl Sync for HttpMethod
impl Unpin for HttpMethod
impl UnwindSafe for HttpMethod
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.