pub struct VersionLifecycle { /* private fields */ }Expand description
Version lifecycle manager
Implementations§
Source§impl VersionLifecycle
impl VersionLifecycle
Sourcepub async fn initialize_version(&self, version_id: Uuid) -> Result<()>
pub async fn initialize_version(&self, version_id: Uuid) -> Result<()>
Initialize a new version in the lifecycle
Sourcepub async fn get_status(&self, version_id: Uuid) -> Result<VersionStatus>
pub async fn get_status(&self, version_id: Uuid) -> Result<VersionStatus>
Get current status of a version
Sourcepub async fn transition(
&self,
version_id: Uuid,
transition: VersionTransition,
) -> Result<()>
pub async fn transition( &self, version_id: Uuid, transition: VersionTransition, ) -> Result<()>
Transition a version to a new status
Sourcepub async fn transition_with_reason(
&self,
version_id: Uuid,
transition: VersionTransition,
reason: &str,
triggered_by: &str,
) -> Result<()>
pub async fn transition_with_reason( &self, version_id: Uuid, transition: VersionTransition, reason: &str, triggered_by: &str, ) -> Result<()>
Transition with reason and triggerer
Sourcepub async fn get_history(&self, version_id: Uuid) -> Result<Vec<LifecycleEvent>>
pub async fn get_history(&self, version_id: Uuid) -> Result<Vec<LifecycleEvent>>
Get lifecycle history for a version
Sourcepub async fn get_versions_by_status(
&self,
status: VersionStatus,
) -> Result<Vec<Uuid>>
pub async fn get_versions_by_status( &self, status: VersionStatus, ) -> Result<Vec<Uuid>>
Get all versions in a specific status
Sourcepub async fn can_promote(&self, version_id: Uuid) -> Result<bool>
pub async fn can_promote(&self, version_id: Uuid) -> Result<bool>
Check if a version can be promoted
Sourcepub async fn can_archive(&self, version_id: Uuid) -> Result<bool>
pub async fn can_archive(&self, version_id: Uuid) -> Result<bool>
Check if a version can be archived
Sourcepub async fn auto_archive(&self) -> Result<Vec<Uuid>>
pub async fn auto_archive(&self) -> Result<Vec<Uuid>>
Auto-archive old versions based on policies
Sourcepub async fn update_policies(&self, policies: LifecyclePolicies) -> Result<()>
pub async fn update_policies(&self, policies: LifecyclePolicies) -> Result<()>
Update lifecycle policies
Sourcepub async fn get_policies(&self) -> Result<LifecyclePolicies>
pub async fn get_policies(&self) -> Result<LifecyclePolicies>
Get current policies
Sourcepub async fn cleanup_version(&self, version_id: Uuid) -> Result<()>
pub async fn cleanup_version(&self, version_id: Uuid) -> Result<()>
Cleanup version from lifecycle tracking
Sourcepub async fn get_statistics(&self) -> Result<LifecycleStatistics>
pub async fn get_statistics(&self) -> Result<LifecycleStatistics>
Get lifecycle statistics
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for VersionLifecycle
impl !RefUnwindSafe for VersionLifecycle
impl Send for VersionLifecycle
impl Sync for VersionLifecycle
impl Unpin for VersionLifecycle
impl UnsafeUnpin for VersionLifecycle
impl !UnwindSafe for VersionLifecycle
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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