pub struct DHTOptions {
pub port: u16,
pub auto_metadata: bool,
pub metadata_timeout: u64,
pub max_metadata_queue_size: usize,
pub max_metadata_worker_count: usize,
pub netmode: NetMode,
pub node_queue_capacity: usize,
}Expand description
DHT 服务器配置
Fields§
§port: u16DHT 端口
auto_metadata: bool是否自动获取元数据
metadata_timeout: u64元数据获取超时(秒)
max_metadata_queue_size: usize元数据获取队列大小(背压限制)
max_metadata_worker_count: usize并发元数据获取工作线程数
netmode: NetMode网络模式配置(仅IPv4、仅IPv6、或双栈)
node_queue_capacity: usize节点队列容量(默认 100000)
Trait Implementations§
Source§impl Clone for DHTOptions
impl Clone for DHTOptions
Source§fn clone(&self) -> DHTOptions
fn clone(&self) -> DHTOptions
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 DHTOptions
impl Debug for DHTOptions
Auto Trait Implementations§
impl Freeze for DHTOptions
impl RefUnwindSafe for DHTOptions
impl Send for DHTOptions
impl Sync for DHTOptions
impl Unpin for DHTOptions
impl UnwindSafe for DHTOptions
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