pub struct Rule {
pub name: String,
pub pass_percentage: u32,
pub id: String,
pub salt: Option<String>,
pub conditions: Vec<String>,
pub id_type: Option<IdType>,
pub return_value: Option<ReturnValue>,
pub group_name: Option<String>,
pub config_delegate: Option<String>,
pub is_experiment_group: Option<bool>,
pub is_control_group: Option<bool>,
pub sampling_rate: Option<f32>,
}Fields§
§name: String§pass_percentage: u32§id: String§salt: Option<String>§conditions: Vec<String>§id_type: Option<IdType>§return_value: Option<ReturnValue>§group_name: Option<String>§config_delegate: Option<String>§is_experiment_group: Option<bool>§is_control_group: Option<bool>§sampling_rate: Option<f32>Implementations§
Source§impl Rule
impl Rule
Sourcepub fn group_name(&self) -> &str
pub fn group_name(&self) -> &str
Returns the value of group_name, or the default value if group_name is unset.
Sourcepub fn config_delegate(&self) -> &str
pub fn config_delegate(&self) -> &str
Returns the value of config_delegate, or the default value if config_delegate is unset.
Sourcepub fn is_experiment_group(&self) -> bool
pub fn is_experiment_group(&self) -> bool
Returns the value of is_experiment_group, or the default value if is_experiment_group is unset.
Sourcepub fn is_control_group(&self) -> bool
pub fn is_control_group(&self) -> bool
Returns the value of is_control_group, or the default value if is_control_group is unset.
Sourcepub fn sampling_rate(&self) -> f32
pub fn sampling_rate(&self) -> f32
Returns the value of sampling_rate, or the default value if sampling_rate is unset.
Trait Implementations§
Source§impl Message for Rule
impl Message for Rule
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
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