Skip to main content

MetaFn

Type Alias MetaFn 

Source
pub type MetaFn = Rc<dyn Fn() -> Result<Value, MetaError>>;
Expand description

A metamethod. Returns the replacement value, or a MetaError to model a metamethod that raises. The serializer treats an error as “the metamethod did not apply” and serializes the table as itself.

Aliased Type§

pub struct MetaFn { /* private fields */ }