Enum libp2p_kad::StoreInserts
source · pub enum StoreInserts {
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 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
.
Trait Implementations§
source§impl Clone for StoreInserts
impl Clone for StoreInserts
source§fn clone(&self) -> StoreInserts
fn clone(&self) -> StoreInserts
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StoreInserts
impl Debug for StoreInserts
source§impl PartialEq for StoreInserts
impl PartialEq for StoreInserts
source§fn eq(&self, other: &StoreInserts) -> bool
fn eq(&self, other: &StoreInserts) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for StoreInserts
impl Eq for StoreInserts
impl StructuralEq for StoreInserts
impl StructuralPartialEq for StoreInserts
Auto Trait Implementations§
impl RefUnwindSafe for StoreInserts
impl Send for StoreInserts
impl Sync for StoreInserts
impl Unpin for StoreInserts
impl UnwindSafe for StoreInserts
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more