#[non_exhaustive]pub struct PragmaEffect {
pub pragma: String,
pub enabled: bool,
pub args: Vec<String>,
pub argument_kind: PragmaArgumentKind,
pub range: SourceLocation,
pub directive_item: Option<HirId>,
pub scope_id: Option<HirScopeId>,
pub package_context: Option<String>,
pub provenance: CompileProvenance,
pub confidence: CompileConfidence,
}Expand description
Pragma or feature state change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pragma: StringPragma name.
enabled: boolWhether the pragma is being enabled (use) or disabled (no).
args: Vec<String>Static, normalized categories or feature names captured by the parser.
argument_kind: PragmaArgumentKindWhether this effect applies broadly or to listed categories/features.
range: SourceLocationSource range for the effect.
directive_item: Option<HirId>Directive that produced this effect.
scope_id: Option<HirScopeId>Scope containing the effect.
package_context: Option<String>Package context active at the effect.
provenance: CompileProvenanceHow this fact was produced.
confidence: CompileConfidenceConfidence in this fact.
Trait Implementations§
Source§impl Clone for PragmaEffect
impl Clone for PragmaEffect
Source§fn clone(&self) -> PragmaEffect
fn clone(&self) -> PragmaEffect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PragmaEffect
impl Debug for PragmaEffect
Source§impl PartialEq for PragmaEffect
impl PartialEq for PragmaEffect
Source§fn eq(&self, other: &PragmaEffect) -> bool
fn eq(&self, other: &PragmaEffect) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PragmaEffect
impl StructuralPartialEq for PragmaEffect
Auto Trait Implementations§
impl Freeze for PragmaEffect
impl RefUnwindSafe for PragmaEffect
impl Send for PragmaEffect
impl Sync for PragmaEffect
impl Unpin for PragmaEffect
impl UnsafeUnpin for PragmaEffect
impl UnwindSafe for PragmaEffect
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