Trait tealr::TypeName[][src]

pub trait TypeName {
    fn get_type_name(dir: Direction) -> Cow<'static, str>;

    fn is_external() -> bool { ... }
}
Expand description

A trait to collect the required type information like the name of the type.

Required methods

fn get_type_name(dir: Direction) -> Cow<'static, str>[src]

returns the type name as how it should show up in the generated .d.tl file

Provided methods

fn is_external() -> bool[src]

This method tells the generator that the type will always be available This is pretty much only the case for native lua/teal types like number

DO NOT overwrite it unless you are ABSOLUTELY sure you need to. The default is correct for 99.999% of the cases.

Implementations on Foreign Types

impl TypeName for bool[src]

impl TypeName for String[src]

impl TypeName for CString[src]

impl TypeName for BString[src]

impl TypeName for &str[src]

impl TypeName for &CStr[src]

impl TypeName for &BStr[src]

impl TypeName for f32[src]

impl TypeName for f64[src]

impl TypeName for i8[src]

impl TypeName for u8[src]

impl TypeName for u16[src]

impl TypeName for i16[src]

impl TypeName for u32[src]

impl TypeName for i32[src]

impl TypeName for u64[src]

impl TypeName for i64[src]

impl TypeName for u128[src]

impl TypeName for i128[src]

impl TypeName for isize[src]

impl TypeName for usize[src]

impl<'lua> TypeName for Value<'lua>[src]

impl<'lua> TypeName for Table<'lua>[src]

impl<'lua> TypeName for String<'lua>[src]

impl<'lua> TypeName for Function<'lua>[src]

impl<T: TypeName> TypeName for Vec<T>[src]

impl<T: TypeName> TypeName for Option<T>[src]

impl<K: TypeName, V: TypeName> TypeName for HashMap<K, V>[src]

impl<K: TypeName, V: TypeName> TypeName for BTreeMap<K, V>[src]

Implementors

impl<'lua, Params, Response> TypeName for tealr::mlu::TypedFunction<'lua, Params, Response> where
    Params: ToLuaMulti<'lua> + TealMultiValue,
    Response: FromLuaMulti<'lua> + TealMultiValue
[src]

fn get_type_name(_: Direction) -> Cow<'static, str>[src]

impl<'lua, Params, Response> TypeName for tealr::rlu::TypedFunction<'lua, Params, Response> where
    Params: ToLuaMulti<'lua> + TealMultiValue,
    Response: FromLuaMulti<'lua> + TealMultiValue
[src]

fn get_type_name(_: Direction) -> Cow<'static, str>[src]