Struct libp2p::gossipsub::subscription_filter::WhitelistSubscriptionFilter [−][src]
pub struct WhitelistSubscriptionFilter(pub HashSet<TopicHash, RandomState>);
Allows only whitelisted subscriptions
Trait Implementations
impl Clone for WhitelistSubscriptionFilter
[src]
impl Clone for WhitelistSubscriptionFilter
[src]pub fn clone(&self) -> WhitelistSubscriptionFilter
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for WhitelistSubscriptionFilter
[src]
impl Default for WhitelistSubscriptionFilter
[src]pub fn default() -> WhitelistSubscriptionFilter
[src]
impl TopicSubscriptionFilter for WhitelistSubscriptionFilter
[src]
impl TopicSubscriptionFilter for WhitelistSubscriptionFilter
[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