#[non_exhaustive]pub enum Method {
Get,
Post,
Put,
Patch,
Delete,
}Expand description
The method a request is made with.
Each one says what it does to the resource it names, which is what decides whether a failed call may be made again.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Get
Read the resource. Changes nothing, so it may always be repeated.
Post
Submit to the resource. Sent twice, it can apply twice.
Put
Replace the resource. Sent twice, it reaches the same state.
Patch
Change part of the resource. Sent twice, it can apply twice.
Delete
Remove the resource. Sent twice, it reaches the same state.
Implementations§
Trait Implementations§
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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more