pub struct FragDef {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: OrderedMap<String>,
pub extension_methods: Vec<FragExtensionMethod>,
pub bases: Vec<String>,
pub type_params: Vec<String>,
pub base_generic_args: OrderedMap<Vec<String>>,
pub test_methods: Vec<String>,
pub property_types: OrderedMap<FragFact>,
pub end_line: usize,
}Expand description
Field order is significant: id, name, namespace, kind, line, methods, then the member-fact additions in that exact order – properties, fields, methodReturns – and after those extensionMethods, appended LAST. Each is omitted entirely when empty, so a type declaring none of them serializes exactly as it did before those additions.
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>The properties value.
fields: Vec<String>The fields value.
method_returns: OrderedMap<String>Member name -> declared return type NAME, in FIRST-DECLARATION SOURCE
ORDER – deliberately OrderedMap, never a BTreeMap: this is an
ordered pair list, and sorting the keys here would break the
serialized bytes.
extension_methods: Vec<FragExtensionMethod>The extension methods this type declares, in source
order, deduped by (name, thisType, arityMin, arityMax). Appended after
method_returns, and omitted entirely when empty, so a type declaring
none keeps its exact prior bytes.
bases: Vec<String>DIRECT base-type identifiers, source
order, deduped. Appended LAST, after extension_methods, omitted when
empty. A resolution input only: resolve_graph strips it (along with
properties/fields/extensionMethods) before graph.json’s def rows, so
the on-disk def bytes are unchanged.
type_params: Vec<String>The declaring type’s own type-parameter names, empty for
every non-generic declaration. Appended after bases, omitted when
empty. A resolution input, like bases: the ctor-DI resolver’s
“is this def itself an open-generic implementation” signal.
base_generic_args: OrderedMap<Vec<String>>Per base name that carried a type-argument list, that
list’s generic-arg descriptors relative to type_params (OrderedMap
for the same reason method_returns is one: the serialized key order
is significant). Appended after type_params, omitted when
empty.
test_methods: Vec<String>The methods a test framework would DISCOVER as
tests, source order, deduped. Appended LAST, after baseGenericArgs,
omitted when empty. Unlike its neighbours this one is NOT stripped by
resolve_graph: it is what devscout tests answers from.
property_types: OrderedMap<FragFact>Property name -> declared type fact, in source order and
under the same dedup as properties. An OrderedMap for the same
reason method_returns is one: the serialized key order is significant.
Appended LAST, after test_methods, omitted when empty. A
resolution input only, like properties/fields.
end_line: usizeThe end line value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FragDef
impl<'de> Deserialize<'de> for FragDef
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>,
impl StructuralPartialEq for FragDef
Auto Trait Implementations§
impl Freeze for FragDef
impl RefUnwindSafe for FragDef
impl Send for FragDef
impl Sync for FragDef
impl Unpin for FragDef
impl UnsafeUnpin for FragDef
impl UnwindSafe for FragDef
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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