macro_rules! uniffi_bridged_engine {
($name:ident, $guid:ty) => { ... };
}Expand description
Generates a UniFFI-exposable bridged engine newtype around
BridgedEngineWrapper, removing the ~100 lines of identical facade
boilerplate each consuming crate used to hand-write.
Usage (invoke in the module the crate’s UDL interface resolves against):
ⓘ
sync15::uniffi_bridged_engine!(LoginsBridgedEngine, String);
sync15::uniffi_bridged_engine!(TabsBridgedEngine, sync_guid::Guid);$guid is the element type the crate’s UDL lowers set_uploaded‘s ids to
(String for logins’ sequence<string>, sync_guid::Guid for the tabs and
webext-storage custom-type sequences). The generated methods return
anyhow::Result, which the crate’s UDL [Throws=...] maps to its error type
via the existing impl From<anyhow::Error>.
The macro always emits prepare_for_sync; a crate whose UDL doesn’t declare
it (logins) simply leaves that inherent method unbound, which is harmless.