pub struct DeprecationManager { /* private fields */ }
Expand description
Deprecation manager implementation
Implementations§
Source§impl DeprecationManager
impl DeprecationManager
Sourcepub fn with_policy(policy: DeprecationPolicy) -> Self
pub fn with_policy(policy: DeprecationPolicy) -> Self
Create with custom policy
Sourcepub fn register_version(
&mut self,
apiversion: &ApiVersion,
) -> Result<(), CoreError>
pub fn register_version( &mut self, apiversion: &ApiVersion, ) -> Result<(), CoreError>
Register a version for deprecation management
Sourcepub fn announce_deprecation(
&mut self,
version: &Version,
reason: DeprecationReason,
replacement_version: Option<Version>,
) -> Result<DeprecationAnnouncement, CoreError>
pub fn announce_deprecation( &mut self, version: &Version, reason: DeprecationReason, replacement_version: Option<Version>, ) -> Result<DeprecationAnnouncement, CoreError>
Announce deprecation of a version
Sourcepub fn get_deprecation_status(
&self,
version: &Version,
) -> Option<DeprecationStatus>
pub fn get_deprecation_status( &self, version: &Version, ) -> Option<DeprecationStatus>
Get deprecation status for a version
Sourcepub fn update_status(
&mut self,
version: &Version,
new_status: DeprecationStatus,
) -> Result<(), CoreError>
pub fn update_status( &mut self, version: &Version, new_status: DeprecationStatus, ) -> Result<(), CoreError>
Update deprecation status
Sourcepub fn perform_maintenance(
&mut self,
) -> Result<Vec<MaintenanceAction>, CoreError>
pub fn perform_maintenance( &mut self, ) -> Result<Vec<MaintenanceAction>, CoreError>
Perform maintenance tasks
Sourcepub fn get_deprecatedversions(&self) -> Vec<&DeprecationStatus>
pub fn get_deprecatedversions(&self) -> Vec<&DeprecationStatus>
Get all deprecated versions
Sourcepub fn getversions_in_phase(
&self,
phase: DeprecationPhase,
) -> Vec<&DeprecationStatus>
pub fn getversions_in_phase( &self, phase: DeprecationPhase, ) -> Vec<&DeprecationStatus>
Get versions in specific phase
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeprecationManager
impl RefUnwindSafe for DeprecationManager
impl Send for DeprecationManager
impl Sync for DeprecationManager
impl Unpin for DeprecationManager
impl UnwindSafe for DeprecationManager
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more