Skip to main content

HasVersion

Trait HasVersion 

Source
pub trait HasVersion {
    // Required method
    fn http_version(&self) -> Version;
}
Expand description

Trait for types that provide access to the HTTP protocol version.

Implement this trait to enable version predicates on custom types. Both CacheableHttpRequest and CacheableHttpResponse implement this trait.

Required Methods§

Source

fn http_version(&self) -> Version

Returns the HTTP protocol version.

Implementors§

Source§

impl<ReqBody> HasVersion for CacheableHttpRequest<ReqBody>
where ReqBody: HttpBody,

Source§

impl<ResBody> HasVersion for CacheableHttpResponse<ResBody>
where ResBody: HttpBody,