pub struct Version(/* private fields */);Expand description
Represents a version of the HTTP spec.
Implementations§
Trait Implementations§
Source§impl FromRequest for Version
impl FromRequest for Version
Source§type Error = Infallible
type Error = Infallible
提取器的错误类型。
Source§async fn from_request(
req: &mut Request,
) -> Result<Version, <Version as FromRequest>::Error>
async fn from_request( req: &mut Request, ) -> Result<Version, <Version as FromRequest>::Error>
根据
Request 创建提取器实例。Source§impl IntoResponseParts for Version
impl IntoResponseParts for Version
Source§type Error = Infallible
type Error = Infallible
发生错误时返回的类型。
Source§fn into_response_parts(
self,
parts: ResponseParts,
) -> Result<ResponseParts, <Version as IntoResponseParts>::Error>
fn into_response_parts( self, parts: ResponseParts, ) -> Result<ResponseParts, <Version as IntoResponseParts>::Error>
向响应添加头部组件。
Source§impl Ord for Version
impl Ord for Version
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl Copy for Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.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<P> IntoResponse for Pwhere
P: IntoResponseParts,
impl<P> IntoResponse for Pwhere
P: IntoResponseParts,
Source§type Error = <P as IntoResponseParts>::Error
type Error = <P as IntoResponseParts>::Error
发生错误时返回的类型。
Source§fn into_response(self) -> Result<Response, <P as IntoResponse>::Error>
fn into_response(self) -> Result<Response, <P as IntoResponse>::Error>
得到一个
Response 实例。