pub struct BusBuilder<E: Clone + Send + 'static> { /* private fields */ }Implementations§
Source§impl<E: Clone + Send + 'static> BusBuilder<E>
impl<E: Clone + Send + 'static> BusBuilder<E>
pub fn name(self, n: impl Into<String>) -> Self
Sourcepub fn cluster(
self,
local: Arc<DistributedPubSub>,
cluster: Arc<ClusterPubSub>,
) -> Self
Available on crate feature bus-cluster only.
pub fn cluster( self, local: Arc<DistributedPubSub>, cluster: Arc<ClusterPubSub>, ) -> Self
bus-cluster only.Enable cluster fan-out via
atomr_cluster_tools::ClusterPubSub. The caller supplies a
local atomr_cluster_tools::DistributedPubSub and a
cluster wrapper already constructed against a transport.
Combine with Self::topic, Self::type_id, and
Self::codec to finish the wiring.
Sourcepub fn topic(self, topic: impl Into<String>) -> Self
Available on crate feature bus-cluster only.
pub fn topic(self, topic: impl Into<String>) -> Self
bus-cluster only.Set the cluster-wide topic name. Defaults to the bus name.
No-op unless cluster() was called first.
Sourcepub fn type_id(self, id: impl Into<String>) -> Self
Available on crate feature bus-cluster only.
pub fn type_id(self, id: impl Into<String>) -> Self
bus-cluster only.Set the cross-node type tag used to dispatch incoming PDUs. Defaults to the topic.
Sourcepub fn codec<EncFn, DecFn>(self, encode: EncFn, decode: DecFn) -> Self
Available on crate feature bus-cluster only.
pub fn codec<EncFn, DecFn>(self, encode: EncFn, decode: DecFn) -> Self
bus-cluster only.Provide encode/decode closures for cross-node delivery.
encode is called for each publish; decode runs on
inbound PDUs from peer nodes.
pub fn build(self) -> BusTopology<E>
Auto Trait Implementations§
impl<E> Freeze for BusBuilder<E>
impl<E> !RefUnwindSafe for BusBuilder<E>
impl<E> Send for BusBuilder<E>
impl<E> Sync for BusBuilder<E>where
E: Sync,
impl<E> Unpin for BusBuilder<E>where
E: Unpin,
impl<E> UnsafeUnpin for BusBuilder<E>
impl<E> !UnwindSafe for BusBuilder<E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more