Trait godot::obj::NewGd

pub trait NewGd: GodotClass {
    // Required method
    fn new_gd() -> Gd<Self>;
}
Expand description

Extension trait for all reference-counted classes.

Required Methods§

fn new_gd() -> Gd<Self>

Return a new, ref-counted Gd containing a default-constructed instance.

MyClass::new_gd() is equivalent to Gd::<MyClass>::default().

Object Safety§

This trait is not object safe.

Implementors§

§

impl<T> NewGd for T
where T: GodotDefault<Memory = MemRefCounted> + Bounds,