Struct godot::builtin::meta::registration::method::ClassMethodInfo
pub struct ClassMethodInfo { /* private fields */ }
Expand description
All info needed to register a method for a class with Godot.
Implementations§
§impl ClassMethodInfo
impl ClassMethodInfo
pub unsafe fn from_signature<S>(
class_name: ClassName,
method_name: StringName,
call_func: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut __GdextClassInstance, _: *const *const __GdextVariant, _: i64, _: *mut __GdextVariant, _: *mut GDExtensionCallError)>,
ptrcall_func: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut __GdextClassInstance, _: *const *const __GdextType, _: *mut __GdextType)>,
method_flags: MethodFlags,
param_names: &[&str],
default_arguments: Vec<Variant>
) -> ClassMethodInfowhere
S: VarcallSignatureTuple,
pub unsafe fn from_signature<S>(
class_name: ClassName,
method_name: StringName,
call_func: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut __GdextClassInstance, _: *const *const __GdextVariant, _: i64, _: *mut __GdextVariant, _: *mut GDExtensionCallError)>,
ptrcall_func: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut __GdextClassInstance, _: *const *const __GdextType, _: *mut __GdextType)>,
method_flags: MethodFlags,
param_names: &[&str],
default_arguments: Vec<Variant>
) -> ClassMethodInfowhere
S: VarcallSignatureTuple,
§Safety
ptrcall_func
, if provided, must:
- Interpret its parameters according to the types specified in
S
. - Return the value that is specified in
S
, or return nothing if the return value is()
.
call_func
, if provided, must:
- Interpret its parameters as a list of
S::PARAM_COUNT
Variant
s. - Return a
Variant
.
call_func
and ptrcall_func
, if provided, must:
- Follow the behavior expected from the
method_flags
.
pub fn register_extension_class_method(&self)
Auto Trait Implementations§
impl Freeze for ClassMethodInfo
impl RefUnwindSafe for ClassMethodInfo
impl !Send for ClassMethodInfo
impl !Sync for ClassMethodInfo
impl Unpin for ClassMethodInfo
impl UnwindSafe for ClassMethodInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more