Function wrap_finalizer_fn
Function wrap_finalizer_fn
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub fn wrap_finalizer_fn(
cb: NemoRelayFinalizerCb,
) -> Box<dyn FnOnce() -> Value + Send>
Wrap a C finalizer callback into a Box<dyn FnOnce() -> Json + Send> for use by the core runtime. The callback is invoked exactly once when the stream is exhausted. The returned C string is parsed as JSON and then freed.
Safety
The caller must ensure cb remains valid until the returned closure is invoked. The C callback must return a valid, heap-allocated JSON C string (or null, in which case Json::Null is returned).