Skip to main content

RefRecord

Struct RefRecord 

Source
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: String

The kind value.

§name: String

The name value.

§qualified: Option<String>

The qualified value.

§member: Option<String>

The member value.

§line: usize

The 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: bool

true 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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.