Type Alias libp2p_kad::KademliaStoreInserts
source · pub type KademliaStoreInserts = StoreInserts;
👎Deprecated: Import the
kad
module instead and refer to this type as kad::StoreInserts
.Aliased Type§
enum KademliaStoreInserts {
Unfiltered,
FilterBoth,
}
Variants§
Unfiltered
Whenever a (provider) record is received,
the record is forwarded immediately to the RecordStore
.
FilterBoth
Whenever a (provider) record is received, an event is emitted.
Provider records generate a InboundRequest::AddProvider
under Event::InboundRequest
,
normal records generate a InboundRequest::PutRecord
under Event::InboundRequest
.
When deemed valid, a (provider) record needs to be explicitly stored in
the RecordStore
via RecordStore::put
or RecordStore::add_provider
,
whichever is applicable. A mutable reference to the RecordStore
can
be retrieved via Behaviour::store_mut
.