pub fn contains(&self, user: &User) -> bool {
        let user_key = user.key().to_string();

        if self.included.contains(&user_key) {
            return true;
        }
        if self.excluded.contains(&user_key) {
            return false;
        }

        for rule in &self.rules {
            if rule.matches(user, &self.key, &self.salt) {
                return true;
            }
        }

        false
    }
/// Determines if the provided User is a part of this segment.
///
/// Inclusion can be determined by specifically listing the user key in the segment, or by
/// matching any of the rules configured for this segment.
Determines if the provided User is a part of this segment.
Inclusion can be determined by specifically listing the user key in the segment, or by
matching any of the rules configured for this segment.
Determines if the provided User is a part of this segment . Inclusion can be determined by specifically listing the user key in the segment or by matching any of the rules configured for this segment .
pub fn contains(&self, user: &User) -> bool {
        let user_key = user.key().to_string();
        if self.included.contains(&user_key) {
            return true;
        }
        if self.excluded.contains(&user_key) {
            return false;
        }
        for rule in &self.rules {
            if rule.matches(user, &self.key, &self.salt) {
                return true;
            }
        }
        false
    }
pub fn contains ( & self , user : & User ) -> bool { let user_key = user . key ( ) . to_string ( ) ; if self . included . contains ( & user_key ) { return true ; } if self . excluded . contains ( & user_key ) { return false ; } for rule in & self . rules { if rule . matches ( user , & self . key , & self . salt ) { return true ; } } false }
Determines if the provided User is a part of this segment.
Determines if the provided User is a part of this segment .
&self
user
&User
&self
user
&User