pub enum Method {
Get,
Post,
Put,
Patch,
Delete,
Head,
Options,
Trace,
Connect,
}Expand description
HTTP method enum for route definitions.
This enum represents the standard HTTP methods supported by fastrust. It is used internally to register routes with the correct HTTP method and to generate OpenAPI specifications.
Variants§
Get
GET - Retrieve a resource
Post
POST - Create a resource
Put
PUT - Replace a resource
Patch
PATCH - Partially update a resource
Delete
DELETE - Delete a resource
Head
HEAD - Get resource headers
Options
OPTIONS - Get supported methods
Trace
TRACE - Echo the request
Connect
CONNECT - Establish a tunnel (not typically used in REST APIs)
Trait Implementations§
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