Skip to main content

Function

Type Alias Function 

Source
pub type Function<'a> = fn(ctx: &mut CurrentContext<'a>, func_data: Option<&mut dyn Any>, args: &[Object<'a>]) -> Object<'a>;
Expand description

The function can be associated with a Context and treated as its method.

Although the signature returns Object<'a>, implementations may return any type implementing [Into<Object> + 'a], primarily to support types like Option<AsObject<'a>>.