Skip to main content

register_context_headers

Function register_context_headers 

Source
pub fn register_context_headers(registry: &mut HeaderRegistry)
Expand description

Register dcontext header deserializers with a dactor HeaderRegistry.

Call this at startup before processing remote messages so that ContextHeader can be reconstructed from wire bytes during remote actor communication.

§Example

use dactor::HeaderRegistry;
use dcontext_dactor::register_context_headers;

let mut registry = HeaderRegistry::new();
register_context_headers(&mut registry);
// pass registry to your transport / runtime