#[non_exhaustive]pub struct Binding {
pub id: HirBindingId,
pub scope_id: HirScopeId,
pub sigil: String,
pub name: String,
pub range: SourceLocation,
pub storage: StorageClass,
pub package_context: Option<String>,
pub declaration_item: Option<HirId>,
pub shadows: Option<HirBindingId>,
}Expand description
Compiler binding produced from a HIR declaration.
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.id: HirBindingIdStable binding id.
scope_id: HirScopeIdScope that owns this binding.
sigil: StringVariable sigil.
name: StringVariable name without sigil.
range: SourceLocationSource range of the binding declaration token.
storage: StorageClassStorage class represented by the declaration.
package_context: Option<String>Package context active for this binding, when known.
declaration_item: Option<HirId>HIR item that declared this binding.
shadows: Option<HirBindingId>Earlier visible binding shadowed by this declaration, when known.
Trait Implementations§
impl Eq for Binding
impl StructuralPartialEq for Binding
Auto Trait Implementations§
impl Freeze for Binding
impl RefUnwindSafe for Binding
impl Send for Binding
impl Sync for Binding
impl Unpin for Binding
impl UnsafeUnpin for Binding
impl UnwindSafe for Binding
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