Trait pax_compiler::parsing::Reflectable
source · pub trait Reflectable {
// Required method
fn get_self_pascal_identifier() -> String;
// Provided methods
fn parse_to_manifest(
ctx: ParsingContext
) -> (ParsingContext, Vec<PropertyDefinition>) { ... }
fn get_import_path() -> String { ... }
fn get_type_id() -> String { ... }
fn get_iterable_type_id() -> Option<String> { ... }
}
Expand description
This trait is used only to extend primitives like u64
with the parser-time method parse_to_manifest
. This
allows the parser binary to codegen calls to ::parse_to_manifest()
even
on primitive types
Required Methods§
Provided Methods§
fn parse_to_manifest( ctx: ParsingContext ) -> (ParsingContext, Vec<PropertyDefinition>)
sourcefn get_import_path() -> String
fn get_import_path() -> String
The import path is the fully namespace-qualified path for a type, like std::vec::Vec
This is distinct from type_id ONLY when the type has generics, like Vec, where
the type_id is distinct across a Vec
fn get_type_id() -> String
fn get_iterable_type_id() -> Option<String>
Object Safety§
This trait is not object safe.