subspace_farmer::cluster::nats_client

Trait GenericBroadcast

source
pub trait GenericBroadcast:
    Encode
    + Decode
    + Debug
    + Send
    + Sync
    + 'static {
    const SUBJECT: &'static str;

    // Provided method
    fn deterministic_message_id(&self) -> Option<HeaderValue> { ... }
}
Expand description

Generic broadcast message.

Broadcast messages are sent by an instance to (potentially) an instance-specific subject that any other app can subscribe to. The same broadcast message can also originate from multiple places and be de-duplicated using Self::deterministic_message_id.

Required Associated Constants§

source

const SUBJECT: &'static str

Broadcast subject with optional * in place of application instance sending broadcast

Provided Methods§

source

fn deterministic_message_id(&self) -> Option<HeaderValue>

Deterministic message ID that is used for de-duplicating messages broadcast by different instances

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

source§

impl GenericBroadcast for ClusterCacheIdentifyBroadcast

source§

const SUBJECT: &'static str = "subspace.cache.*.identify"

source§

impl GenericBroadcast for ClusterControllerCacheIdentifyBroadcast

source§

const SUBJECT: &'static str = "subspace.controller.*.cache-identify"

source§

impl GenericBroadcast for ClusterControllerFarmerIdentifyBroadcast

source§

const SUBJECT: &'static str = "subspace.controller.farmer-identify"

source§

impl GenericBroadcast for ClusterFarmerIdentifyFarmBroadcast

source§

const SUBJECT: &'static str = "subspace.farmer.*.identify"