pub struct RefRecord {Show 16 fields
pub kind: String,
pub name: String,
pub qualified: Option<String>,
pub member: Option<String>,
pub line: usize,
pub namespace: Option<String>,
pub type_arg_count: Option<usize>,
pub generic: bool,
pub receiver_type: Option<String>,
pub arg_count: Option<usize>,
pub receiver_args: Option<Vec<String>>,
pub outer_types: Vec<String>,
pub args: Option<Vec<String>>,
pub receiver_property_owner: Option<String>,
pub receiver_call_owner: Option<String>,
pub receiver_call_member: Option<String>,
}Expand description
Represents RefRecord.
Fields§
§kind: StringThe kind value.
name: StringThe name value.
qualified: Option<String>The qualified value.
member: Option<String>The member value.
line: usizeThe line value.
namespace: Option<String>None only for ‘imports’ refs – a using directive is not
namespace-scoped, so ns is deliberately null. Every other ref
carries Some(ns), where ns
may itself be the empty string at file scope.
type_arg_count: Option<usize>The type arg count value.
generic: booltrue when a uses-member qualifier carried a
type-argument list anywhere (Cache<T>.x, Ns.Cache<T>.x): syntax
only a TYPE can carry, so the resolver treats it as type-certainty
for non-enum member emission. Always false for every other ref
kind.
receiver_type: Option<String>The declared type NAME of the receiver a uses-member
qualifier names, when the enclosing scope holds exactly one fact for
it (a declared local, a var x = new T() local, a parameter, a
field, or a primary-constructor parameter). Set ONLY for a BARE,
non-generic qualifier – see the member_access_expression arm’s
guard, which is what makes the chain-tail hazard structurally
impossible. Always None for every other ref kind.
arg_count: Option<usize>The argument count of the call this
member access is the CALLEE of (argument_list named-child count),
recorded only when the access is the function field of an
invocation_expression. A property read (x.P) carries None, which
is what keeps it out of the arity-matched extension tier entirely.
Appended AFTER receiver_type. Always None for every other ref kind.
receiver_args: Option<Vec<String>>The DECLARED receiver type’s top-level
type-argument descriptors, present only when that type is generic. A
position naming a type parameter of the enclosing method or class is
recorded as “*” (wildcard): nothing at the fact site knows its binding.
Travels with receiver_type – the fact carries both or neither.
Appended LAST, after arg_count.
outer_types: Vec<String>The walk’s own type_stack verbatim: the enclosing type simple
names, OUTERMOST first, the same order type_id joins with “+” to build
a nested def id. Empty at namespace level, and empty is exactly what an
absent key deserializes to. Appended LAST, after receiver_args.
args: Option<Vec<String>>Generic-arg descriptors for a ‘ctor-param’ ref’s
parameter type (same descriptor shape as receiver_args: a "*"
wildcard for a pass-through of the enclosing type’s own type
parameter), present only when that type is generic. None for every
other ref kind. Appended LAST of all, after outer_types – ‘ctor-param’
is a ref kind no other caller touches, so putting it after that
“last of all” field costs no other ref kind a single byte.
receiver_property_owner: Option<String>The type whose PROPERTY the qualifier’s last segment is, for
a two-segment chain whose head the enclosing scope has a fact for
(“a.Settings” in a.Settings.Reload()). Never travels with
receiver_type: that one is bare-qualifier-only and this one is
dotted-qualifier-only, which is what keeps the chain-tail hazard
structurally impossible – the resolver reaches the tail’s type through
the head type’s RECORDED property types, never by inheriting the head’s
own. Appended after args.
receiver_call_owner: Option<String>The type whose METHOD a var x = Q.M(...) initializer
called, and that method’s name. Always set as a pair, and never
alongside receiver_type: the local’s type is whatever M returns, a
lookup only the resolver can do. Appended LAST of all.
receiver_call_member: Option<String>The receiver call member value.
Auto Trait Implementations§
impl Freeze for RefRecord
impl RefUnwindSafe for RefRecord
impl Send for RefRecord
impl Sync for RefRecord
impl Unpin for RefRecord
impl UnsafeUnpin for RefRecord
impl UnwindSafe for RefRecord
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more