Attribute Macro perseus::engine_only_fn

source ·
#[engine_only_fn]
Expand description

A convenience macro that makes sure the given function is only defined on the engine-side, creating an empty function on the browser-side. Perseus implicitly expects most of your state generation functions to be defined in this way (though you certainly don’t have to use this macro).

Note that this will convert async functions to non-async functions on the browser-side (your function will be left alone on the engine-side).