Skip to main content

callback_interface

Attribute Macro callback_interface 

Source
#[callback_interface]
Expand description

Declare a callback interface: a trait whose &self methods the consumer implements. Producers accept one as Arc<dyn Trait> (or Option<Arc<dyn Trait>>). Every method returns Result<T, weaveffi::ForeignError>, which carries the consumer’s failure as a value.