#[non_exhaustive]pub enum PirAnchorKind {
ExplicitSource,
SourceBackedGenerated,
GeneratedNoSource,
DynamicBoundary,
AmbientInput,
Unknown,
}Expand description
Provenance class for a PIR node’s source anchor.
Every source-derived node anchors to the workspace range that caused it. Generated, framework, or ambient nodes only exist when their provenance is explicit, so a provider can never mistake a modeled fact for source text.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ExplicitSource
Node anchors directly to source text.
SourceBackedGenerated
Node anchors to a framework declaration, not a fabricated method body.
GeneratedNoSource
Generated node with no source backing; receipt-only.
DynamicBoundary
Node anchors to a dynamic boundary range when available.
AmbientInput
Node reports an ambient-input class rather than source text.
Unknown
Fallback node whose anchor could not be classified.
Implementations§
Source§impl PirAnchorKind
impl PirAnchorKind
Trait Implementations§
Source§impl Clone for PirAnchorKind
impl Clone for PirAnchorKind
Source§fn clone(&self) -> PirAnchorKind
fn clone(&self) -> PirAnchorKind
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 moreimpl Copy for PirAnchorKind
Source§impl Debug for PirAnchorKind
impl Debug for PirAnchorKind
impl Eq for PirAnchorKind
Source§impl Hash for PirAnchorKind
impl Hash for PirAnchorKind
Source§impl PartialEq for PirAnchorKind
impl PartialEq for PirAnchorKind
Source§fn eq(&self, other: &PirAnchorKind) -> bool
fn eq(&self, other: &PirAnchorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PirAnchorKind
Auto Trait Implementations§
impl Freeze for PirAnchorKind
impl RefUnwindSafe for PirAnchorKind
impl Send for PirAnchorKind
impl Sync for PirAnchorKind
impl Unpin for PirAnchorKind
impl UnsafeUnpin for PirAnchorKind
impl UnwindSafe for PirAnchorKind
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