Struct rust_ipfs::p2p::SwarmOptions
source · pub struct SwarmOptions {Show 20 fields
pub bootstrap: Vec<Multiaddr>,
pub mdns: bool,
pub mdns_ipv6: bool,
pub disable_kad: bool,
pub disable_bitswap: bool,
pub relay_server: bool,
pub relay_server_config: Option<RelayConfig>,
pub kad_config: Option<Either<KadConfig, KademliaConfig>>,
pub ping_config: Option<Config>,
pub bitswap_config: Option<BitswapConfig>,
pub identify_config: Option<IdentifyConfiguration>,
pub kad_store_config: KadStoreConfig,
pub pubsub_config: Option<PubsubConfig>,
pub addrbook_config: Option<AddressBookConfig>,
pub portmapping: bool,
pub relay: bool,
pub dcutr: bool,
pub connection_idle: Duration,
pub rendezvous_client: bool,
pub rendezvous_server: bool,
}
Expand description
Defines the configuration for an IPFS swarm.
Fields§
§bootstrap: Vec<Multiaddr>
The peers to connect to on startup.
mdns: bool
Enables mdns for peer discovery and announcement when true.
mdns_ipv6: bool
enables ipv6 for mdns
disable_kad: bool
disable kad
disable_bitswap: bool
disable bitswap
relay_server: bool
Relay Server
relay_server_config: Option<RelayConfig>
Relay Server Configuration
kad_config: Option<Either<KadConfig, KademliaConfig>>
Kademlia Configuration
ping_config: Option<Config>
Ping Configuration
bitswap_config: Option<BitswapConfig>
bitswap config
identify_config: Option<IdentifyConfiguration>
identify configuration
kad_store_config: KadStoreConfig
Kad store config Note: Only supports MemoryStoreConfig at this time
pubsub_config: Option<PubsubConfig>
Pubsub configuration,
addrbook_config: Option<AddressBookConfig>
addressbook config
portmapping: bool
UPnP/PortMapping
relay: bool
Relay client
dcutr: bool
Enables dcutr
connection_idle: Duration
Connection idle
rendezvous_client: bool
§rendezvous_server: bool
Trait Implementations§
source§impl From<&IpfsOptions> for SwarmOptions
impl From<&IpfsOptions> for SwarmOptions
source§fn from(options: &IpfsOptions) -> Self
fn from(options: &IpfsOptions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for SwarmOptions
impl Send for SwarmOptions
impl Sync for SwarmOptions
impl Unpin for SwarmOptions
impl UnwindSafe for SwarmOptions
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> 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