Trait tealr::ToTypename
source · pub trait ToTypename {
// Required method
fn to_typename() -> Type;
// Provided methods
fn to_old_type_parts() -> Cow<'static, [NamePart]> { ... }
fn to_function_param() -> Vec<FunctionParam> { ... }
}
Expand description
This trait turns a A into a type representation for Lua/Teal
Required Methods§
sourcefn to_typename() -> Type
fn to_typename() -> Type
generates the type representation
Provided Methods§
sourcefn to_old_type_parts() -> Cow<'static, [NamePart]>
fn to_old_type_parts() -> Cow<'static, [NamePart]>
👎Deprecated
Used to get the old representation. Should basically never be used or implemented manually
sourcefn to_function_param() -> Vec<FunctionParam>
fn to_function_param() -> Vec<FunctionParam>
generates the type representation when used as a parameter By default will assume no name was given
This is useful when the type you made is specifically made to add more context to function parameters.
Object Safety§
This trait is not object safe.