pub struct LocalBinding {
pub file: String,
pub name: String,
pub span: Span,
pub scope_end: u64,
pub type_name: Option<String>,
}Expand description
A local binding (parameter, let/const, loop variable, catch variable) that shadows outer names. Not a symbol — recorded so resolution never binds a shadowed reference to the outer definition it no longer means.
Fields§
§file: String§name: String§span: SpanWhere the binding is introduced.
scope_end: u64End of the innermost definition containing it — the binding shadows
references from span.start to here.
type_name: Option<String>Declared/constructed type when the language chose to expose it
(c *Counter, c := Counter{}): local type evidence for method
binding. None = shadow-only binding.
Trait Implementations§
Source§impl Clone for LocalBinding
impl Clone for LocalBinding
Source§fn clone(&self) -> LocalBinding
fn clone(&self) -> LocalBinding
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 LocalBinding
impl Debug for LocalBinding
Source§impl<'de> Deserialize<'de> for LocalBinding
impl<'de> Deserialize<'de> for LocalBinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LocalBinding
Source§impl Hash for LocalBinding
impl Hash for LocalBinding
Source§impl Ord for LocalBinding
impl Ord for LocalBinding
Source§fn cmp(&self, other: &LocalBinding) -> Ordering
fn cmp(&self, other: &LocalBinding) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LocalBinding
impl PartialEq for LocalBinding
Source§impl PartialOrd for LocalBinding
impl PartialOrd for LocalBinding
Source§impl Serialize for LocalBinding
impl Serialize for LocalBinding
impl StructuralPartialEq for LocalBinding
Auto Trait Implementations§
impl Freeze for LocalBinding
impl RefUnwindSafe for LocalBinding
impl Send for LocalBinding
impl Sync for LocalBinding
impl Unpin for LocalBinding
impl UnsafeUnpin for LocalBinding
impl UnwindSafe for LocalBinding
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