[][src]Struct tari_p2p::comms_connector::TopicSubscriptionFactory

pub struct TopicSubscriptionFactory<T, M> { /* fields omitted */ }

This structure is used to create subscriptions to particular topics. Note that subscriptions obtained after messages are published will miss messages.

Implementations

impl<T, M> TopicSubscriptionFactory<T, M> where
    T: Clone + Eq + Debug + Send,
    M: Clone + Send
[src]

pub fn new(sender: Sender<TopicPayload<T, M>>) -> Self[src]

pub fn get_subscription(
    &self,
    topic: T,
    label: &'static str
) -> impl Stream<Item = M>
[src]

Create a subscription stream to a particular topic. The provided label is used to identify which consumer is lagging.

pub fn get_subscription_fused(
    &self,
    topic: T,
    label: &'static str
) -> Fuse<impl Stream<Item = M>>
[src]

Convenience function that returns a fused (stream::Fuse) version of the subscription stream.

Trait Implementations

impl<T: Clone, M: Clone> Clone for TopicSubscriptionFactory<T, M>[src]

Auto Trait Implementations

impl<T, M> !RefUnwindSafe for TopicSubscriptionFactory<T, M>

impl<T, M> Send for TopicSubscriptionFactory<T, M> where
    M: Send,
    T: Send

impl<T, M> Sync for TopicSubscriptionFactory<T, M> where
    M: Send,
    T: Send

impl<T, M> Unpin for TopicSubscriptionFactory<T, M>

impl<T, M> !UnwindSafe for TopicSubscriptionFactory<T, M>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> CloneAny for T where
    T: Clone + Any

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

impl<T> From<T> for T[src]

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> IntoSql for T

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,