pub struct FlagDefinition {
pub name: String,
pub description: String,
pub strategy: Strategy,
pub enabled: bool,
}Expand description
功能开关定义
Fields§
§name: String开关名称
description: String开关描述
strategy: Strategy开关策略
enabled: bool是否启用
Implementations§
Source§impl FlagDefinition
impl FlagDefinition
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
设置描述
Sourcepub fn with_strategy(self, strategy: Strategy) -> Self
pub fn with_strategy(self, strategy: Strategy) -> Self
设置策略
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
设置启用状态
Trait Implementations§
Source§impl Clone for FlagDefinition
impl Clone for FlagDefinition
Source§fn clone(&self) -> FlagDefinition
fn clone(&self) -> FlagDefinition
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 FlagDefinition
impl Debug for FlagDefinition
Source§impl<'de> Deserialize<'de> for FlagDefinition
impl<'de> Deserialize<'de> for FlagDefinition
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 FlagDefinition
impl RefUnwindSafe for FlagDefinition
impl Send for FlagDefinition
impl Sync for FlagDefinition
impl Unpin for FlagDefinition
impl UnsafeUnpin for FlagDefinition
impl UnwindSafe for FlagDefinition
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