#[non_exhaustive]pub struct LexicalBindingFact {
pub name: LexicalName,
pub role: LexicalRole,
pub source_anchor: PirSourceAnchor,
pub body_idx: usize,
pub body_owner: BodyOwnerKind,
}Expand description
A single lexical variable binding fact extracted from PIR.
Each fact represents one read or write of a lexical (my/state) variable,
anchored to its source range and discriminated by body identity.
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.name: LexicalNameThe lexical variable (sigil + name).
role: LexicalRoleWhether this fact records a read or write.
source_anchor: PirSourceAnchorSource anchor for this reference (always anchored in PR1).
body_idx: usizeBody index where this binding occurs (0-based).
body_owner: BodyOwnerKindBody owner kind (what construct owns this body).
Trait Implementations§
Source§impl Clone for LexicalBindingFact
impl Clone for LexicalBindingFact
Source§fn clone(&self) -> LexicalBindingFact
fn clone(&self) -> LexicalBindingFact
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 LexicalBindingFact
impl Debug for LexicalBindingFact
impl Eq for LexicalBindingFact
Source§impl PartialEq for LexicalBindingFact
impl PartialEq for LexicalBindingFact
Source§fn eq(&self, other: &LexicalBindingFact) -> bool
fn eq(&self, other: &LexicalBindingFact) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LexicalBindingFact
Auto Trait Implementations§
impl Freeze for LexicalBindingFact
impl RefUnwindSafe for LexicalBindingFact
impl Send for LexicalBindingFact
impl Sync for LexicalBindingFact
impl Unpin for LexicalBindingFact
impl UnsafeUnpin for LexicalBindingFact
impl UnwindSafe for LexicalBindingFact
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