Enum libp2p_kad::KademliaStoreInserts
source · [−]pub enum KademliaStoreInserts {
Unfiltered,
FilterBoth,
}
Expand description
The configurable filtering strategies for the acceptance of incoming records.
This can be used for e.g. signature verification or validating
the accompanying Key
.
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 KademliaEvent::InboundRequest
,
normal records generate a InboundRequest::PutRecord
under KademliaEvent::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 Kademlia::store_mut
.
Trait Implementations
sourceimpl Clone for KademliaStoreInserts
impl Clone for KademliaStoreInserts
sourcefn clone(&self) -> KademliaStoreInserts
fn clone(&self) -> KademliaStoreInserts
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for KademliaStoreInserts
impl Debug for KademliaStoreInserts
impl Copy for KademliaStoreInserts
impl Eq for KademliaStoreInserts
impl StructuralEq for KademliaStoreInserts
impl StructuralPartialEq for KademliaStoreInserts
Auto Trait Implementations
impl RefUnwindSafe for KademliaStoreInserts
impl Send for KademliaStoreInserts
impl Sync for KademliaStoreInserts
impl Unpin for KademliaStoreInserts
impl UnwindSafe for KademliaStoreInserts
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more