Enum StoreInserts
pub enum StoreInserts {
Unfiltered,
FilterBoth,
}
Available on crate feature
kad
only.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§
§impl Clone for StoreInserts
impl Clone for StoreInserts
§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 more§impl Debug for StoreInserts
impl Debug for StoreInserts
§impl PartialEq for StoreInserts
impl PartialEq for StoreInserts
impl Copy for StoreInserts
impl Eq for StoreInserts
impl StructuralPartialEq for StoreInserts
Auto Trait Implementations§
impl Freeze for StoreInserts
impl RefUnwindSafe for StoreInserts
impl Send for StoreInserts
impl Sync for StoreInserts
impl Unpin for StoreInserts
impl UnwindSafe for StoreInserts
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more