Trait ScriptType

Source
pub trait ScriptType:
    Sealed
    + Send
    + Sync
    + 'static {
    // Provided method
    fn type_meta() -> &'static TypeMeta { ... }
}
Expand description

A Rust type that has been registered with the Script Engine.

Whenever you export a Rust type using the export macro, the macro automatically registers the type introspection metadata for that type and implements the ScriptType trait for it.

You cannot (and should not) implement this trait manually.

Provided Methods§

Source

fn type_meta() -> &'static TypeMeta

Returns the introspection metadata of this Rust type registered in the Script Engine.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: RegisteredType + ?Sized> ScriptType for T