#[non_exhaustive]pub struct CompileDirective {
pub action: CompileDirectiveAction,
pub module: Option<String>,
pub args: Vec<String>,
pub range: SourceLocation,
pub item_id: Option<HirId>,
pub scope_id: Option<HirScopeId>,
pub package_context: Option<String>,
pub kind: CompileDirectiveKind,
pub provenance: CompileProvenance,
pub confidence: CompileConfidence,
}Expand description
One compile-time directive.
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.action: CompileDirectiveActionDirective action.
module: Option<String>Module or pragma name.
args: Vec<String>Static arguments captured by the parser.
range: SourceLocationSource range for the directive.
item_id: Option<HirId>HIR item attached to this directive, when one exists.
scope_id: Option<HirScopeId>Scope containing the directive.
package_context: Option<String>Package context active at the directive.
kind: CompileDirectiveKindDirective classification.
provenance: CompileProvenanceHow this fact was produced.
confidence: CompileConfidenceConfidence in this fact.
Trait Implementations§
Source§impl Clone for CompileDirective
impl Clone for CompileDirective
Source§fn clone(&self) -> CompileDirective
fn clone(&self) -> CompileDirective
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 CompileDirective
impl Debug for CompileDirective
Source§impl PartialEq for CompileDirective
impl PartialEq for CompileDirective
Source§fn eq(&self, other: &CompileDirective) -> bool
fn eq(&self, other: &CompileDirective) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CompileDirective
impl StructuralPartialEq for CompileDirective
Auto Trait Implementations§
impl Freeze for CompileDirective
impl RefUnwindSafe for CompileDirective
impl Send for CompileDirective
impl Sync for CompileDirective
impl Unpin for CompileDirective
impl UnsafeUnpin for CompileDirective
impl UnwindSafe for CompileDirective
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