[−][src]Struct tari_pubsub::TopicSubscriptionFactory
This structure hold the Subscriber end of a Pub-Sub channel and can be used to create new filtered subscriber channels.
Methods
impl<T, M> TopicSubscriptionFactory<T, M> where
T: Eq + Send,
M: Clone + Send,
[src]
T: Eq + Send,
M: Clone + Send,
pub fn new(subscriber: TopicSubscriber<T, M>) -> Self
[src]
pub fn get_subscription(&self, topic: T) -> impl Stream<Item = M>
[src]
Provide a subscriber (which will be consumed) and a topic to filter it by and this function will return a stream that yields only the desired messages
pub fn get_subscription_fused(&self, topic: T) -> Fuse<impl Stream<Item = M>>
[src]
Provide a fused version of the subscription stream so that domain modules don't need to know about fuse()
Auto Trait Implementations
impl<T, M> !RefUnwindSafe for TopicSubscriptionFactory<T, M>
impl<T, M> Send for TopicSubscriptionFactory<T, M> where
M: Send + Sync,
T: Send + Sync,
M: Send + Sync,
T: Send + Sync,
impl<T, M> Sync for TopicSubscriptionFactory<T, M> where
M: Send + Sync,
T: Send + Sync,
M: Send + Sync,
T: Send + Sync,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,