fn can_be_used_with_value_type(&self, value: &OneOrMany<Value<'_>>) -> bool {
        match (self, value) {
            (Identifier::Filename | Identifier::LifecycleEventType | Identifier::Tags, value) => {
                match_one_or_many_value!(value, Value::StringLiteral(_))
            }
            // TODO(fxbug.dev/86960): similar to severities, we can probably have reserved values
            // for lifecycle event types.
            // TODO(fxbug.dev/86961): support time diferences (1h30m, 30s, etc) instead of only
            // timestamp comparison.
            (
                Identifier::Pid | Identifier::Tid | Identifier::LineNumber | Identifier::Timestamp,
                value,
            ) => {
                match_one_or_many_value!(value, Value::Number(_))
            }
            // TODO(fxbug.dev/86962): it should also be possible to compare severities with a fixed
            // set of numbers.
            (Identifier::Severity, value) => {
                match_one_or_many_value!(value, Value::Severity(_))
            }
        }
    }
/// Validates that all the values are of a type that can be used in an operation with this
/// identifier.
Validates that all the values are of a type that can be used in an operation with this
identifier.
Validates that all the values are of a type that can be used in an operation with this identifier .
fn can_be_used_with_value_type(&self, value: &OneOrMany<Value<'_>>) -> bool {
        match (self, value) {
            (Identifier::Filename | Identifier::LifecycleEventType | Identifier::Tags, value) => {
                match_one_or_many_value!(value, Value::StringLiteral(_))
            }
            // TODO(fxbug.dev/86960): similar to severities, we can probably have reserved values
            // for lifecycle event types.
            // TODO(fxbug.dev/86961): support time diferences (1h30m, 30s, etc) instead of only
            // timestamp comparison.
            (
                Identifier::Pid | Identifier::Tid | Identifier::LineNumber | Identifier::Timestamp,
                value,
            ) => {
                match_one_or_many_value!(value, Value::Number(_))
            }
            // TODO(fxbug.dev/86962): it should also be possible to compare severities with a fixed
            // set of numbers.
            (Identifier::Severity, value) => {
                match_one_or_many_value!(value, Value::Severity(_))
            }
        }
    }
fn can_be_used_with_value_type ( & self , value : & OneOrMany < Value < ' _ > > ) -> bool { match ( self , value ) { ( Identifier :: Filename | Identifier :: LifecycleEventType | Identifier :: Tags , value ) => { match_one_or_many_value ! ( value Value StringLiteral ( ) ) } // TODO(fxbug.dev/86960): similar to severities, we can probably have reserved values // for lifecycle event types. // TODO(fxbug.dev/86961): support time diferences (1h30m, 30s, etc) instead of only // timestamp comparison. ( Identifier :: Pid | Identifier :: Tid | Identifier :: LineNumber | Identifier :: Timestamp , value , ) => { match_one_or_many_value ! ( value Value Number ( ) ) } // TODO(fxbug.dev/86962): it should also be possible to compare severities with a fixed // set of numbers. ( Identifier :: Severity , value ) => { match_one_or_many_value ! ( value Value Severity ( ) ) } } }
Validates that all the values are of a type that can be used in an operation with this
identifier.
Validates that all the values are of a type that can be used in an operation with this identifier .
&self
value
&OneOrMany<Value<'_>>
&self
value
&OneOrMany<Value<'_>>