Skip to main content

RequestVersionExt

Trait RequestVersionExt 

Source
pub trait RequestVersionExt {
    // Required methods
    fn version(&self) -> Option<String>;
    fn version_or(&self, default: &str) -> String;
}
Expand description

Extension trait to get API version from request

Required Methods§

Source

fn version(&self) -> Option<String>

Get the API version from request extensions

Source

fn version_or(&self, default: &str) -> String

Get the API version or return default

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§