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: boolEnables mdns for peer discovery and announcement when true.
mdns_ipv6: boolenables ipv6 for mdns
disable_kad: booldisable kad
disable_bitswap: booldisable bitswap
relay_server: boolRelay 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: KadStoreConfigKad store config Note: Only supports MemoryStoreConfig at this time
pubsub_config: Option<PubsubConfig>Pubsub configuration,
addrbook_config: Option<AddressBookConfig>addressbook config
portmapping: boolUPnP/PortMapping
relay: boolRelay client
dcutr: boolEnables dcutr
connection_idle: DurationConnection idle
rendezvous_client: bool§rendezvous_server: boolTrait 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