pub trait AsDyn<Trait>: GodotClasswhere
Trait: ?Sized + 'static,{
// 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§
fn dyn_upcast(&self) -> &Trait
fn dyn_upcast_mut(&mut self) -> &mut Trait
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.