pub struct GradualRollout {
pub feature_id: String,
pub current_percentage: u8,
pub target_percentage: u8,
pub increment_step: u8,
pub enabled: bool,
}Expand description
Gradual rollout configuration.
Manages percentage-based feature rollouts with automatic ramping.
Fields§
§feature_id: StringFeature identifier
current_percentage: u8Current rollout percentage (0-100)
target_percentage: u8Target rollout percentage (0-100)
increment_step: u8Increment step for each ramp
enabled: boolWhether rollout is active
Implementations§
Source§impl GradualRollout
impl GradualRollout
Sourcepub fn with_target(self, target: u8) -> Self
pub fn with_target(self, target: u8) -> Self
Set the target rollout percentage.
Sourcepub fn has_access(&self, user_id: &str) -> bool
pub fn has_access(&self, user_id: &str) -> bool
Check if a user has access to the feature.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if the rollout is complete.
Trait Implementations§
Source§impl Clone for GradualRollout
impl Clone for GradualRollout
Source§fn clone(&self) -> GradualRollout
fn clone(&self) -> GradualRollout
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 GradualRollout
impl Debug for GradualRollout
Source§impl<'de> Deserialize<'de> for GradualRollout
impl<'de> Deserialize<'de> for GradualRollout
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GradualRollout
impl RefUnwindSafe for GradualRollout
impl Send for GradualRollout
impl Sync for GradualRollout
impl Unpin for GradualRollout
impl UnwindSafe for GradualRollout
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