pub struct DefRecord {Show 16 fields
pub id: String,
pub name: String,
pub namespace: String,
pub kind: String,
pub line: usize,
pub methods: Vec<String>,
pub properties: Vec<String>,
pub fields: Vec<String>,
pub method_returns: Vec<(String, String)>,
pub extension_methods: Vec<ExtensionMethod>,
pub bases: Vec<String>,
pub type_params: Vec<String>,
pub base_generic_args: Vec<(String, Vec<String>)>,
pub test_methods: Vec<String>,
pub property_types: Vec<(String, Fact)>,
pub end_line: usize,
}Expand description
Represents DefRecord.
Fields§
§id: StringThe id value.
name: StringThe name value.
namespace: StringThe namespace value.
kind: StringThe kind value.
line: usizeThe line value.
methods: Vec<String>The methods value.
properties: Vec<String>Declared property names, source order, deduped
(indexers excluded by construction: indexer_declaration is a
different grammar node). NO accessibility filter, deliberately
asymmetric with methods: static/const/readonly/expression-bodied all
count and only indexers are excluded, so a private member is still a
member of the type. Empty for every
enum-member def.
fields: Vec<String>Declared field names, source order, deduped, every
declarator of every field_declaration (“private int a, b;”
contributes both). event_field_declaration is a distinct node type
and is NOT a field for this purpose. Same no-accessibility-filter
rule as properties.
method_returns: Vec<(String, String)>(method name, declared return type NAME) pairs in
FIRST-declaration source order, parallel to methods (same
is_recorded_method predicate, so the two can never drift). The
first declaration of a name claims the slot outright: a later
overload with a different return type is ignored, and a first
declaration whose return type yields no fact (void, var, a
predefined type) BLOCKS the name rather than letting a later
overload stand in for it. A Vec of pairs, not a map: the serialized
key order is significant (see graph.rs’s FragDef).
extension_methods: Vec<ExtensionMethod>The extension methods this type declares: every method
whose FIRST parameter carries the this modifier, in source order,
deduped by (name, thisType, arityMin, arityMax). Appended LAST, after
method_returns, and omitted at serialization when empty. Unlike
methods there is NO accessibility filter (internal static class FooExtensions is the shape this feature exists for) and no static
check on either the method or its class – C# already disallows a
this parameter anywhere else, so the parameter modifier IS the
discriminator.
bases: Vec<String>The DIRECT base-type identifiers this
declaration lists, in source order, deduped. Same base_list traversal
record_base_list walks for its inherits refs, reduced to a base
IDENTIFIER because the resolver re-RESOLVES these names through the
ordinary ladder rather than matching them; the resulting closure is
what lets the extension tier see an inherited instance member and
decline. Appended after extension_methods and omitted when empty.
type_params: Vec<String>The declaring type’s OWN type-parameter names (class MongoRepository<T> records ["T"]), empty for every non-generic
declaration. This is the ctor-DI resolver’s “is this def itself an
open-generic implementation” signal. Appended after bases, omitted
when empty.
base_generic_args: Vec<(String, Vec<String>)>Per base name that carried a type-argument list, that
list’s generic-arg descriptors relative to type_params (a "*"
wildcard marks a position that is a pass-through of the declaring
type’s own parameter). A Vec of pairs, not a map, for the same
reason method_returns is: the serialized key order is significant.
Appended after type_params, omitted when empty; a base
with no type-argument list at all contributes no entry.
test_methods: Vec<String>The methods this type declares that a test
framework would DISCOVER as tests, in source order, deduped. Appended
LAST, after base_generic_args, and omitted at serialization when
empty. The attribute IS the fact, which is why this is the one member
fact with no accessibility filter at all and why no file, folder or
type-name convention is read anywhere.
property_types: Vec<(String, Fact)>(property name, declared type fact) pairs for exactly the
properties properties records, in the same source order and under the
same dedup. A property whose declared type yields no fact (a predefined
type) has no entry, so the two lists are parallel but not equal in
length. A Vec of pairs, not a map, for the same reason
method_returns is one: the serialized key order is significant.
Appended LAST, after test_methods.
end_line: usize1-based last line of the complete declaration node.
Auto Trait Implementations§
impl Freeze for DefRecord
impl RefUnwindSafe for DefRecord
impl Send for DefRecord
impl Sync for DefRecord
impl Unpin for DefRecord
impl UnsafeUnpin for DefRecord
impl UnwindSafe for DefRecord
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