#[non_exhaustive]pub enum Method {
Delete,
Get,
Head,
Patch,
Post,
Put,
}Expand description
HTTP request methods.
See also Mozilla’s documentation, the RFC7231, Section 4 and IANA’s Hypertext Transfer Protocol (HTTP) Method Registry.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Delete
The DELETE method requests that the origin server remove the association between the target resource and its current functionality.
Get
The GET method requests transfer of a current selected representation for the target resource.
Head
The HEAD method is identical to GET except that the server MUST NOT send a message body in the response.
Patch
The PATCH method requests that a set of changes described in the request entity be applied to the resource identified by the Request- URI.
See RFC5789, Section 2.
Post
The POST method requests that the target resource process the representation enclosed in the request according to the resource’s own specific semantics.
For example, POST is used for the following functions (among others):
- Providing a block of data, such as the fields entered into an HTML form, to a data-handling process;
- Posting a message to a bulletin board, newsgroup, mailing list, blog, or similar group of articles;
- Creating a new resource that has yet to be identified by the origin server; and
- Appending data to a resource’s existing representation(s).
Put
The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Method
impl<'de> Deserialize<'de> for Method
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Method, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Method, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Serialize for Method
impl Serialize for Method
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl Copy for Method
impl Eq for Method
impl StructuralPartialEq for Method
Auto Trait Implementations§
impl Freeze for Method
impl RefUnwindSafe for Method
impl Send for Method
impl Sync for Method
impl Unpin for Method
impl UnwindSafe for Method
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<D> DeserializeWith<JsonFormat> for Dwhere
D: DeserializeOwned,
impl<D> DeserializeWith<JsonFormat> for Dwhere
D: DeserializeOwned,
Source§fn deserialize_with(body: ResponseBody) -> Result<D, Error>
fn deserialize_with(body: ResponseBody) -> Result<D, Error>
Source§impl<D> DeserializeWith<XmlFormat> for Dwhere
D: DeserializeOwned,
impl<D> DeserializeWith<XmlFormat> for Dwhere
D: DeserializeOwned,
Source§fn deserialize_with(body: ResponseBody) -> Result<D, Error>
fn deserialize_with(body: ResponseBody) -> Result<D, Error>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.