pub struct ApiVersions { /* private fields */ }Expand description
Explicit collection of version groups; no version implicitly includes another.
Implementations§
Source§impl ApiVersions
impl ApiVersions
Sourcepub fn with(self, version: ApiVersion) -> Result<Self, VersionError>
pub fn with(self, version: ApiVersion) -> Result<Self, VersionError>
Add a group, rejecting duplicate version labels before router assembly.
Sourcepub fn versions(&self) -> &[ApiVersion]
pub fn versions(&self) -> &[ApiVersion]
Inspect registered groups, for example to mount version-specific Swagger routes.
Trait Implementations§
Source§impl Clone for ApiVersions
impl Clone for ApiVersions
Auto Trait Implementations§
impl !RefUnwindSafe for ApiVersions
impl !UnwindSafe for ApiVersions
impl Freeze for ApiVersions
impl Send for ApiVersions
impl Sync for ApiVersions
impl Unpin for ApiVersions
impl UnsafeUnpin for ApiVersions
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