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§

source

fn parse_to_manifest( ctx: ParsingContext ) -> (ParsingContext, Vec<PropertyDefinition>)

source

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 and a Vec. In both cases of Vec, the import_path will remain the same.

source

fn get_type_id() -> String

source

fn get_iterable_type_id() -> Option<String>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Reflectable for Rotation

source§

impl Reflectable for Size

source§

impl Reflectable for Numeric

source§

impl Reflectable for bool

source§

impl Reflectable for f32

source§

impl Reflectable for f64

source§

impl Reflectable for i8

source§

impl Reflectable for i32

source§

impl Reflectable for i64

source§

impl Reflectable for i128

source§

impl Reflectable for isize

source§

impl Reflectable for u8

source§

impl Reflectable for u32

source§

impl Reflectable for u64

source§

impl Reflectable for u128

source§

impl Reflectable for usize

source§

impl Reflectable for String

source§

impl Reflectable for Point

source§

impl Reflectable for SizePixels

source§

impl Reflectable for StringBox

source§

impl Reflectable for Transform2D

source§

impl<T> Reflectable for Rc<T>

source§

impl<T: Reflectable> Reflectable for Option<T>

source§

impl<T: Reflectable> Reflectable for Vec<T>

Implementors§