Struct rust_ipfs::p2p::SwarmOptions  
source · pub struct SwarmOptions {Show 16 fields
    pub keypair: Keypair,
    pub peer_id: PeerId,
    pub bootstrap: Vec<Multiaddr>,
    pub mdns: bool,
    pub mdns_ipv6: bool,
    pub relay_server: bool,
    pub relay_server_config: Option<RelayConfig>,
    pub kad_config: Option<KademliaConfig>,
    pub ping_config: Option<PingConfig>,
    pub identify_config: Option<IdentifyConfiguration>,
    pub kad_store_config: Option<KadStoreConfig>,
    pub pubsub_config: Option<PubsubConfig>,
    pub portmapping: bool,
    pub keep_alive: bool,
    pub relay: bool,
    pub dcutr: bool,
}Expand description
Defines the configuration for an IPFS swarm.
Fields§
§keypair: KeypairThe keypair for the PKI based identity of the local node.
peer_id: PeerIdThe peer address of the local node created from the keypair.
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
relay_server: boolRelay Server
relay_server_config: Option<RelayConfig>Relay Server Configuration
kad_config: Option<KademliaConfig>Kademlia Configuration
ping_config: Option<PingConfig>Ping Configuration
identify_config: Option<IdentifyConfiguration>identify configuration
kad_store_config: Option<KadStoreConfig>Kad store config Note: Only supports MemoryStoreConfig at this time
pubsub_config: Option<PubsubConfig>Pubsub configuration,
portmapping: boolUPnP/PortMapping
keep_alive: boolKeep alive
relay: boolRelay client
dcutr: boolEnables dcutr
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.