pub enum PeerStoreSizeConfig {
Unbounded,
Limit(u32),
}Expand description
Configure how many peers will be stored.
Variants§
Unbounded
Add new peers to the store regardless of the current size. For memory-limited PeerStore
implementations, consider using a bounded size.
Limit(u32)
Bound the size of the PeerStore. When set, no new peers will be requested if the database
has at least this amount of peers.
Trait Implementations§
Source§impl Clone for PeerStoreSizeConfig
impl Clone for PeerStoreSizeConfig
Source§fn clone(&self) -> PeerStoreSizeConfig
fn clone(&self) -> PeerStoreSizeConfig
Returns a duplicate 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 PeerStoreSizeConfig
impl Debug for PeerStoreSizeConfig
Source§impl Default for PeerStoreSizeConfig
impl Default for PeerStoreSizeConfig
Source§fn default() -> PeerStoreSizeConfig
fn default() -> PeerStoreSizeConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PeerStoreSizeConfig
impl RefUnwindSafe for PeerStoreSizeConfig
impl Send for PeerStoreSizeConfig
impl Sync for PeerStoreSizeConfig
impl Unpin for PeerStoreSizeConfig
impl UnwindSafe for PeerStoreSizeConfig
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