pub enum Method {
Get,
Post,
Put,
Delete,
Patch,
Head,
Options,
Connect,
Trace,
}Expand description
请求方法枚举
Variants§
Get
GET 方法
Post
POST 方法
Put
PUT 方法
Delete
DELETE 方法
Patch
PATCH 方法
Head
HEAD 方法
Options
OPTIONS 方法
Connect
CONNECT 方法
Trace
TRACE 方法
Implementations§
Trait Implementations§
impl Copy for Method
impl Eq for Method
Source§impl FromStr for Method
impl FromStr for Method
Source§fn from_str(s: &str) -> Result<Method, <Method as FromStr>::Err>
fn from_str(s: &str) -> Result<Method, <Method as FromStr>::Err>
将字符串解析为 Method(RFC 9110 严格大小写敏感)
HTTP 方法令牌在语义上大小写敏感(“GET” 与 “get” 是不同方法),
与 zenith_web::normalize::parse_method 保持全库语义统一,防止
双解析器分歧引入的规范化绕过(请求走私面)。零堆分配。
Source§type Err = MethodParseError
type Err = MethodParseError
The associated error which can be returned from parsing.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.