pub struct ClassMethodInfo { /* private fields */ }Expand description
All info needed to register a method for a class with Godot.
Implementations§
Source§impl ClassMethodInfo
impl ClassMethodInfo
Sourcepub unsafe fn from_signature<C: GodotClass, Params: ParamTuple, Ret: GodotConvert>(
method_name: StringName,
call_func: GDExtensionClassMethodCall,
ptrcall_func: GDExtensionClassMethodPtrCall,
method_flags: MethodFlags,
param_names: &[&str],
default_arguments: Vec<Variant>,
) -> Self
pub unsafe fn from_signature<C: GodotClass, Params: ParamTuple, Ret: GodotConvert>( method_name: StringName, call_func: GDExtensionClassMethodCall, ptrcall_func: GDExtensionClassMethodPtrCall, method_flags: MethodFlags, param_names: &[&str], default_arguments: Vec<Variant>, ) -> Self
§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_COUNTVariants. - 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