Trait AsDyn

Source
pub trait AsDyn<Trait: ?Sized>: GodotClass {
    // Required methods
    fn dyn_upcast(&self) -> &Trait;
    fn dyn_upcast_mut(&mut self) -> &mut Trait;
}
Expand description

Trait that defines a T -> dyn Trait relation for use in DynGd.

You should typically not implement this manually, but use the #[godot_dyn] macro.

Required Methods§

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§