pub struct Pragma {
pub pragma_name: ValueOrGlob<String>,
}Expand description
Selector for PRAGMA statements, scoped to a pragma name
§String syntax examples
Pragma– any pragma.Pragma(journal_mode)– onlyjournal_mode.
Fields§
§pragma_name: ValueOrGlob<String>The pragma name, or * for any.
Implementations§
Source§impl Pragma
impl Pragma
Sourcepub fn new(pragma_name: impl Into<ValueOrGlob<String>>) -> Self
pub fn new(pragma_name: impl Into<ValueOrGlob<String>>) -> Self
Creates a new Pragma with the provided field values.
Each argument accepts any type that implements Into<ValueOrGlob<T>>, so callers can pass a raw value, a ValueOrGlob, or an Option<T>.
Sourcepub fn with_pragma_name(self, value: impl Into<ValueOrGlob<String>>) -> Self
pub fn with_pragma_name(self, value: impl Into<ValueOrGlob<String>>) -> Self
Sets Pragma::pragma_name and returns self for method chaining.
The pragma name, or * for any.
Sourcepub const fn is_all_glob(&self) -> bool
pub const fn is_all_glob(&self) -> bool
Sourcepub const fn is_all_value(&self) -> bool
pub const fn is_all_value(&self) -> bool
Sourcepub const fn is_any_glob(&self) -> bool
pub const fn is_any_glob(&self) -> bool
Sourcepub const fn is_any_value(&self) -> bool
pub const fn is_any_value(&self) -> bool
Sourcepub const fn specificity(&self) -> usize
pub const fn specificity(&self) -> usize
Trait Implementations§
Source§impl Default for Pragma
Defaults to Pragma::empty, producing a selector where every field is a glob.
impl Default for Pragma
Defaults to Pragma::empty, producing a selector where every field is a glob.
Source§impl Display for Pragma
Formats this Pragma using the CLI selector syntax. When all fields are globs, renders the bare identifier Pragma; otherwise renders the identifier with parenthesized dot-separated fields.
impl Display for Pragma
Formats this Pragma using the CLI selector syntax. When all fields are globs, renders the bare identifier Pragma; otherwise renders the identifier with parenthesized dot-separated fields.
Source§impl From<Pragma> for AccessControlSelector
Converts a Pragma into its corresponding AccessControlSelector variant.
impl From<Pragma> for AccessControlSelector
Converts a Pragma into its corresponding AccessControlSelector variant.
Source§impl FromStr for Pragma
Parses a selector string into a Pragma. Accepts the syntax Pragma or Pragma(field1.field2).
impl FromStr for Pragma
Parses a selector string into a Pragma. Accepts the syntax Pragma or Pragma(field1.field2).