pub struct ServerSettings {
pub max_info_hashes: usize,
pub max_peers_per_info_hash: usize,
pub max_immutable_values: usize,
pub max_mutable_values: usize,
pub filter: Box<dyn RequestFilter>,
}
Expand description
Settings for the default dht server.
Fields§
§max_info_hashes: usize
The maximum info_hashes for which to store peers.
Defaults to MAX_INFO_HASHES
max_peers_per_info_hash: usize
The maximum peers to store per info_hash.
Defaults to MAX_PEERS
max_immutable_values: usize
Maximum number of immutable values to store.
Defaults to MAX_VALUES
max_mutable_values: usize
Maximum number of mutable values to store.
Defaults to MAX_VALUES
filter: Box<dyn RequestFilter>
Filter requests before handling them.
Defaults to a function that always returns true.
Trait Implementations§
Source§impl Clone for ServerSettings
impl Clone for ServerSettings
Source§fn clone(&self) -> ServerSettings
fn clone(&self) -> ServerSettings
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 ServerSettings
impl Debug for ServerSettings
Auto Trait Implementations§
impl Freeze for ServerSettings
impl !RefUnwindSafe for ServerSettings
impl Send for ServerSettings
impl Sync for ServerSettings
impl Unpin for ServerSettings
impl !UnwindSafe for ServerSettings
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