Struct gdnative::nativescript::init::ClassBuilder[][src]

pub struct ClassBuilder<C> { /* fields omitted */ }

Implementations

impl<C> ClassBuilder<C> where
    C: NativeClass
[src]

pub fn add_method_advanced(&self, method: ScriptMethod<'_>)[src]

pub fn add_method_with_rpc_mode(
    &self,
    name: &str,
    method: unsafe extern "C" fn(*mut c_void, *mut c_void, *mut c_void, i32, *mut *mut godot_variant) -> godot_variant,
    rpc_mode: RpcMode
)
[src]

pub fn add_method(
    &self,
    name: &str,
    method: unsafe extern "C" fn(*mut c_void, *mut c_void, *mut c_void, i32, *mut *mut godot_variant) -> godot_variant
)
[src]

pub fn add_property<T>(
    &'a self,
    name: &'a str
) -> PropertyBuilder<'a, C, T, InvalidSetter<'a>, InvalidGetter<'a>> where
    T: Export
[src]

Returns a PropertyBuilder which can be used to add a property to the class being registered.

Examples

Basic usage:

builder
    .add_property("foo")
    .default(0.0)
    .with_hint((-10.0..=30.0).into())
    .with_getter(MyType::get_foo)
    .with_setter(MyType::set_foo)
    .done();

pub fn add_signal(&self, signal: Signal<'_>)[src]

Trait Implementations

impl<C> Debug for ClassBuilder<C> where
    C: Debug
[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for ClassBuilder<C> where
    C: RefUnwindSafe
[src]

impl<C> !Send for ClassBuilder<C>[src]

impl<C> !Sync for ClassBuilder<C>[src]

impl<C> Unpin for ClassBuilder<C> where
    C: Unpin
[src]

impl<C> UnwindSafe for ClassBuilder<C> where
    C: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.