pub fn match_state(&self, interaction: &Interaction) -> bool {
        if !interaction.provider_states.is_empty() {
            if self.state().is_empty() {
                false
            } else {
                let re = Regex::new(&self.state()).unwrap();
                interaction.provider_states.iter().any(|state| re.is_match(&state.name))
            }
        } else {
            self.has_state() && self.state().is_empty()
        }
    }
/// If the filter matches the interaction provider state using a regular expression. If the
/// filter value is the empty string, then it will match interactions with no provider state.
///
/// # Panics
/// If the state filter value can't be parsed as a regular expression
If the filter matches the interaction provider state using a regular expression. If the
filter value is the empty string, then it will match interactions with no provider state.
If the filter matches the interaction provider state using a regular expression . If the filter value is the empty string then it will match interactions with no provider state .
pub fn match_state(&self, interaction: &Interaction) -> bool {
        if !interaction.provider_states.is_empty() {
            if self.state().is_empty() {
                false
            } else {
                let re = Regex::new(&self.state()).unwrap();
                interaction.provider_states.iter().any(|state| re.is_match(&state.name))
            }
        } else {
            self.has_state() && self.state().is_empty()
        }
    }
pub fn match_state ( & self , interaction : & Interaction ) -> bool { if ! interaction . provider_states . is_empty ( ) { if self . state ( ) . is_empty ( ) { false } else { let re = Regex :: new ( & self . state ( ) ) . unwrap ( ) ; interaction . provider_states . iter ( ) . any ( | state | re . is_match ( & state . name ) ) } } else { self . has_state ( ) && self . state ( ) . is_empty ( ) } }
If the filter matches the interaction provider state using a regular expression.
If the filter matches the interaction provider state using a regular expression .
&self
interaction
&Interaction
&self
interaction
&Interaction
panics
If the state filter value can't be parsed as a regular expression
If the state filter value can ' t be parsed as a regular expression