Attribute Macro uniffi::constructor

source ·
#[constructor]
Expand description

An attribute for constructors.

Constructors are in impl blocks which have a #[uniffi::export] attribute,

This exists so #[uniffi::export] can emit its input verbatim without causing unexpected errors in the entire exported block. This happens very often when the proc-macro is run on an incomplete input by rust-analyzer while the developer is typing.

So much better to do nothing here then let the impl block find the attribute.