Function spacetimedb_sdk::once_on_subscription_applied

source ·
pub fn once_on_subscription_applied(
    callback: impl FnOnce() + Send + 'static
) -> SubscriptionCallbackId
Expand description

Register a callback to be invoked once upon a subscription’s matching rows becoming available.

The callback will be invoked after a successful subscribe or subscribe_owned call when the initial set of matching rows becomes available.

The callback will be unregistered after running.

The returned SubscriptionCallbackId can be passed to remove_on_subscription_applied to unregister the callback.