pub enum VersionStrategy {
UrlPrefix,
Header,
AcceptHeader,
}Expand description
Strategy for extracting the API version from a request.
Variants§
UrlPrefix
Version in URL path prefix: /v1/users.
Header
Version in a custom header (default: X-API-Version).
AcceptHeader
Version in Accept header: application/vnd.myapi.v1+json.
Trait Implementations§
Source§impl Clone for VersionStrategy
impl Clone for VersionStrategy
Source§fn clone(&self) -> VersionStrategy
fn clone(&self) -> VersionStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VersionStrategy
impl Debug for VersionStrategy
Source§impl PartialEq for VersionStrategy
impl PartialEq for VersionStrategy
impl Copy for VersionStrategy
impl Eq for VersionStrategy
impl StructuralPartialEq for VersionStrategy
Auto Trait Implementations§
impl Freeze for VersionStrategy
impl RefUnwindSafe for VersionStrategy
impl Send for VersionStrategy
impl Sync for VersionStrategy
impl Unpin for VersionStrategy
impl UnwindSafe for VersionStrategy
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).