[][src]Struct gdnative_core::init::ClassBuilder

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

Methods

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

pub fn add_method_advanced(&self, method: ScriptMethod)[src]

pub fn add_method(&self, name: &str, method: ScriptMethodFn)[src]

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

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

Examples

Basic usage:

This example is not tested
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> Debug for ClassBuilder<C>[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for ClassBuilder<C> where
    C: RefUnwindSafe

impl<C> !Send for ClassBuilder<C>

impl<C> !Sync for ClassBuilder<C>

impl<C> Unpin for ClassBuilder<C> where
    C: Unpin

impl<C> UnwindSafe for ClassBuilder<C> where
    C: UnwindSafe

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.