Struct gdnative_core::nativescript::init::ClassBuilder [−][src]
Implementations
impl<C: NativeClass> ClassBuilder<C>
[src]
pub fn add_method_advanced(&self, method: ScriptMethod<'_>)
[src]
pub fn add_method_with_rpc_mode(
&self,
name: &str,
method: ScriptMethodFn,
rpc_mode: RpcMode
)
[src]
&self,
name: &str,
method: ScriptMethodFn,
rpc_mode: RpcMode
)
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]
T: Export,
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
Auto Trait Implementations
impl<C> RefUnwindSafe for ClassBuilder<C> where
C: RefUnwindSafe,
[src]
C: RefUnwindSafe,
impl<C> !Send for ClassBuilder<C>
[src]
impl<C> !Sync for ClassBuilder<C>
[src]
impl<C> Unpin for ClassBuilder<C> where
C: Unpin,
[src]
C: Unpin,
impl<C> UnwindSafe for ClassBuilder<C> where
C: UnwindSafe,
[src]
C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,