Struct libp2p::gossipsub::subscription_filter::MaxCountSubscriptionFilter [−][src]
pub struct MaxCountSubscriptionFilter<T> where
T: TopicSubscriptionFilter, { pub filter: T, pub max_subscribed_topics: usize, pub max_subscriptions_per_request: usize, }
Adds a max count to a given subscription filter
Fields
filter: T
max_subscribed_topics: usize
max_subscriptions_per_request: usize
Trait Implementations
impl<T> TopicSubscriptionFilter for MaxCountSubscriptionFilter<T> where
T: TopicSubscriptionFilter,
[src]
impl<T> TopicSubscriptionFilter for MaxCountSubscriptionFilter<T> where
T: TopicSubscriptionFilter,
[src]pub fn can_subscribe(&mut self, topic_hash: &TopicHash) -> bool
[src]
pub fn filter_incoming_subscriptions(
&mut self,
subscriptions: &'a [GossipsubSubscription],
currently_subscribed_topics: &BTreeSet<TopicHash>
) -> Result<HashSet<&'a GossipsubSubscription, RandomState>, String>
[src]
&mut self,
subscriptions: &'a [GossipsubSubscription],
currently_subscribed_topics: &BTreeSet<TopicHash>
) -> Result<HashSet<&'a GossipsubSubscription, RandomState>, String>
pub fn filter_incoming_subscription_set(
&mut self,
subscriptions: HashSet<&'a GossipsubSubscription, RandomState>,
_currently_subscribed_topics: &BTreeSet<TopicHash>
) -> Result<HashSet<&'a GossipsubSubscription, RandomState>, String>
[src]
&mut self,
subscriptions: HashSet<&'a GossipsubSubscription, RandomState>,
_currently_subscribed_topics: &BTreeSet<TopicHash>
) -> Result<HashSet<&'a GossipsubSubscription, RandomState>, String>
pub fn allow_incoming_subscription(
&mut self,
subscription: &GossipsubSubscription
) -> bool
[src]
&mut self,
subscription: &GossipsubSubscription
) -> bool
Auto Trait Implementations
impl<T> RefUnwindSafe for MaxCountSubscriptionFilter<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for MaxCountSubscriptionFilter<T> where
T: Send,
T: Send,
impl<T> Sync for MaxCountSubscriptionFilter<T> where
T: Sync,
T: Sync,
impl<T> Unpin for MaxCountSubscriptionFilter<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for MaxCountSubscriptionFilter<T> where
T: UnwindSafe,
T: UnwindSafe,