logo
#[repr(C)]
pub struct som_method_def_t { pub reserved: LPVOID, pub name: som_atom_t, pub params: usize, pub func: Option<extern "C" fn(thing: *mut som_asset_t, argc: u32, argv: *const VALUE, p_result: &mut VALUE) -> BOOL>, }
Expand description

Method of an asset.

Fields

reserved: LPVOIDname: som_atom_t

Method name.

params: usize

Parameters count.

The actual arguments count can be lesser then specified here:

function asset.func(a,b,c);  // native asset method accepts 3 parameters

asset.func("one"); // call with only one parameter.
func: Option<extern "C" fn(thing: *mut som_asset_t, argc: u32, argv: *const VALUE, p_result: &mut VALUE) -> BOOL>

Method body.

Trait Implementations

Empty method.

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.