pub struct Versioned<V, E> { /* private fields */ }Expand description
An endpoint scoped to a specific API version.
The version prefix is prepended to the path at routing time.
ⓘ
struct V1;
impl ApiVersion for V1 { const PREFIX: &'static str = "v1"; }
type API = (
Versioned<V1, GetEndpoint<UsersPath, Vec<User>>>, // /v1/users
Versioned<V2, GetEndpoint<UsersPath, Vec<User>>>, // /v2/users
);Trait Implementations§
Source§impl<V: ApiVersion, E: BindableEndpoint> BindableEndpoint for Versioned<V, E>
impl<V: ApiVersion, E: BindableEndpoint> BindableEndpoint for Versioned<V, E>
impl<V: ApiVersion, E: ApiSpec> ApiSpec for Versioned<V, E>
Auto Trait Implementations§
impl<V, E> Freeze for Versioned<V, E>
impl<V, E> RefUnwindSafe for Versioned<V, E>where
V: RefUnwindSafe,
E: RefUnwindSafe,
impl<V, E> Send for Versioned<V, E>
impl<V, E> Sync for Versioned<V, E>
impl<V, E> Unpin for Versioned<V, E>
impl<V, E> UnsafeUnpin for Versioned<V, E>
impl<V, E> UnwindSafe for Versioned<V, E>where
V: UnwindSafe,
E: UnwindSafe,
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