pub enum Method {
Get,
Head,
Post,
Put,
Patch,
Delete,
}Expand description
Supported HTTP Methods.
Variants
Get
GET Method.
Head
HEAD Method.
Post
POST Method.
Put
PUT Method.
Patch
PATCH Method.
Delete
Delete Method.
Implementations
sourceimpl Method
impl Method
sourcepub fn try_from(bytes: &[u8]) -> Result<Self, RequestError>
pub fn try_from(bytes: &[u8]) -> Result<Self, RequestError>
Returns a Method object if the parsing of bytes is successful.
The method is case sensitive. A call to try_from with the input b“get“ will return an error, but when using the input b“GET“, it returns Method::Get.
Errors
InvalidHttpMethod is returned if the specified HTTP method is unsupported.
Trait Implementations
sourceimpl PartialEq<Method> for Method
impl PartialEq<Method> for Method
impl Copy for Method
impl Eq for Method
impl StructuralEq for Method
impl StructuralPartialEq for Method
Auto Trait Implementations
impl RefUnwindSafe for Method
impl Send for Method
impl Sync for Method
impl Unpin for Method
impl UnwindSafe for Method
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more