Skip to main content

encode

Function encode 

Source
pub fn encode(
    key: &StateKey,
    value: &StateValue,
    metadata: Option<&KeyMetadata>,
) -> Bytes
Expand description

Encode a (key, value, metadata) triple into the xenith binary wire format.

Pass metadata = Some(...) if you intend to use crate::ReadStrategy::Quorum on the receiving side — the metadata travels with the message so the receiver can register it without a separate call.