state_bridge!() { /* proc-macro */ }Expand description
Generates the full state bridge surface for a fixed list of fields.
Each field expands to:
- Three methods on the
StateBridgeImpltrait (set_$name,get_$name,clear_$name). - Three corresponding wrapper methods on
StateBridge. - Three corresponding methods on
StateBridgeClient. - Three method declarations on the WASM
RawWasmStateBridgeextern type and three forwarders in theStateBridgeImplimpl forWasmStateBridge. - Three lines in the
WasmStateBridgeTypeScript interface. - One field on
test_support::InMemoryStateBridgeand three forwarders in itsStateBridgeImplimpl, gated on#[cfg(test)].
All fields share the same shape: set_$name(value: $ty), get_$name() -> Option<$ty>,
clear_$name().