Skip to main content

callback_interface

Attribute Macro callback_interface 

Source
#[callback_interface]
Expand description

Declare a callback interface: a Send + Sync trait whose &self methods the consumer implements. Producers accept one as Arc<dyn Trait> (or Option<Arc<dyn Trait>>). Every method returns Result<T, E> with E: From<weaveffi::ForeignError>; when E is a #[weaveffi::error] domain, the consumer’s typed errors arrive as its variants.