pub struct VersioningConfig { /* private fields */ }
Implementations§
Source§impl VersioningConfig
impl VersioningConfig
pub fn builder() -> VersioningConfigBuilder
Source§impl VersioningConfig
impl VersioningConfig
Sourcepub fn add_version(&mut self, version: String, api_version: ApiVersion)
pub fn add_version(&mut self, version: String, api_version: ApiVersion)
Add a new API version
Sourcepub fn deprecate_version(
&mut self,
version: &str,
message: Option<String>,
sunset_date: Option<String>,
)
pub fn deprecate_version( &mut self, version: &str, message: Option<String>, sunset_date: Option<String>, )
Set a version as deprecated
Sourcepub fn get_default_version(&self) -> Option<&ApiVersion>
pub fn get_default_version(&self) -> Option<&ApiVersion>
Get the default version
Sourcepub fn get_version(&self, version: &str) -> Option<&ApiVersion>
pub fn get_version(&self, version: &str) -> Option<&ApiVersion>
Get a specific version
Sourcepub fn get_strategy(&self) -> &VersionStrategy
pub fn get_strategy(&self) -> &VersionStrategy
Get the versioning strategy
Sourcepub fn get_versions(&self) -> &HashMap<String, ApiVersion>
pub fn get_versions(&self) -> &HashMap<String, ApiVersion>
Get all versions
Sourcepub fn get_versions_mut(&mut self) -> &mut HashMap<String, ApiVersion>
pub fn get_versions_mut(&mut self) -> &mut HashMap<String, ApiVersion>
Get all versions as mutable reference
Sourcepub fn clone_config(
&self,
) -> (HashMap<String, ApiVersion>, VersionStrategy, Option<String>, bool, String, String, bool)
pub fn clone_config( &self, ) -> (HashMap<String, ApiVersion>, VersionStrategy, Option<String>, bool, String, String, bool)
Clone all configuration for rebuilding
Trait Implementations§
Source§impl Clone for VersioningConfig
impl Clone for VersioningConfig
Source§fn clone(&self) -> VersioningConfig
fn clone(&self) -> VersioningConfig
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 VersioningConfig
impl Debug for VersioningConfig
Source§impl Default for VersioningConfig
impl Default for VersioningConfig
Source§fn default() -> VersioningConfig
fn default() -> VersioningConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VersioningConfig
impl RefUnwindSafe for VersioningConfig
impl Send for VersioningConfig
impl Sync for VersioningConfig
impl Unpin for VersioningConfig
impl UnwindSafe for VersioningConfig
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