pub struct ConditioningRegistry { /* private fields */ }Expand description
Profile registry tracking versions and active promotion pointers.
Implementations§
Source§impl ConditioningRegistry
impl ConditioningRegistry
Sourcepub fn register(
&mut self,
profile_id: &str,
version: u64,
spec_identity: u64,
approved_by: Option<String>,
) -> Result<(), &'static str>
pub fn register( &mut self, profile_id: &str, version: u64, spec_identity: u64, approved_by: Option<String>, ) -> Result<(), &'static str>
Register a new profile version.
Sourcepub fn activate(
&mut self,
profile_id: &str,
version: u64,
) -> Result<(Option<u64>, u64), &'static str>
pub fn activate( &mut self, profile_id: &str, version: u64, ) -> Result<(Option<u64>, u64), &'static str>
Activate / promote a version to become the current active profile.
Sourcepub fn rollback(
&mut self,
profile_id: &str,
target_version: Option<u64>,
) -> Result<(u64, u64), &'static str>
pub fn rollback( &mut self, profile_id: &str, target_version: Option<u64>, ) -> Result<(u64, u64), &'static str>
Rollback active version to a target version or previous active version.
Sourcepub fn active_version(&self, profile_id: &str) -> Option<u64>
pub fn active_version(&self, profile_id: &str) -> Option<u64>
Query the currently active version for a profile.
Sourcepub fn get_active(&self, profile_id: &str) -> Option<&ProfileVersionEntry>
pub fn get_active(&self, profile_id: &str) -> Option<&ProfileVersionEntry>
Query the currently active version entry for a profile.
Sourcepub fn get_version(
&self,
profile_id: &str,
version: u64,
) -> Option<&ProfileVersionEntry>
pub fn get_version( &self, profile_id: &str, version: u64, ) -> Option<&ProfileVersionEntry>
Query entry details for a registered version.
Sourcepub fn list_versions(&self, profile_id: &str) -> Vec<u64>
pub fn list_versions(&self, profile_id: &str) -> Vec<u64>
List all registered versions for a profile.
Trait Implementations§
Source§impl Debug for ConditioningRegistry
impl Debug for ConditioningRegistry
Auto Trait Implementations§
impl Freeze for ConditioningRegistry
impl RefUnwindSafe for ConditioningRegistry
impl Send for ConditioningRegistry
impl Sync for ConditioningRegistry
impl Unpin for ConditioningRegistry
impl UnsafeUnpin for ConditioningRegistry
impl UnwindSafe for ConditioningRegistry
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.