Struct libp2p_gossipsub::subscription_filter::MaxCountSubscriptionFilter [−][src]
pub struct MaxCountSubscriptionFilter<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> TopicSubscriptionFilter for MaxCountSubscriptionFilter<T>
[src]
impl<T: TopicSubscriptionFilter> TopicSubscriptionFilter for MaxCountSubscriptionFilter<T>
[src]fn can_subscribe(&mut self, topic_hash: &TopicHash) -> bool
[src]
fn filter_incoming_subscriptions<'a>(
&mut self,
subscriptions: &'a [GossipsubSubscription],
currently_subscribed_topics: &BTreeSet<TopicHash>
) -> Result<HashSet<&'a GossipsubSubscription>, String>
[src]
&mut self,
subscriptions: &'a [GossipsubSubscription],
currently_subscribed_topics: &BTreeSet<TopicHash>
) -> Result<HashSet<&'a GossipsubSubscription>, String>
fn filter_incoming_subscription_set<'a>(
&mut self,
subscriptions: HashSet<&'a GossipsubSubscription>,
_currently_subscribed_topics: &BTreeSet<TopicHash>
) -> Result<HashSet<&'a GossipsubSubscription>, String>
[src]
&mut self,
subscriptions: HashSet<&'a GossipsubSubscription>,
_currently_subscribed_topics: &BTreeSet<TopicHash>
) -> Result<HashSet<&'a GossipsubSubscription>, String>
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,