Struct ipfs_embed::NetworkConfig[][src]

pub struct NetworkConfig {
    pub node_key: Keypair,
    pub node_name: String,
    pub enable_mdns: bool,
    pub enable_kad: bool,
    pub allow_non_globals_in_dht: bool,
    pub psk: Option<PreSharedKey>,
    pub ping: PingConfig,
    pub gossipsub: GossipsubConfig,
    pub bitswap: BitswapConfig,
}

Network configuration.

Fields

node_key: Keypair

Node identity keypair.

node_name: String

Name of the node. Sent over the wire for debugging purposes.

enable_mdns: bool

Enable mdns.

enable_kad: bool

Enable kad.

allow_non_globals_in_dht: bool

Should we insert non-global addresses into the DHT?

psk: Option<PreSharedKey>

Pre shared key for pnet.

ping: PingConfig

Ping config.

gossipsub: GossipsubConfig

Gossipsub config.

bitswap: BitswapConfig

Bitswap config.

Implementations

impl NetworkConfig[src]

pub fn new() -> Self[src]

Creates a new network configuration.

pub fn public(&self) -> PublicKey[src]

The public node key.

pub fn peer_id(&self) -> PeerId[src]

The peer id of the node.

Trait Implementations

impl Clone for NetworkConfig[src]

impl Debug for NetworkConfig[src]

impl Default for NetworkConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> References<RawCodec> for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,