Struct ipfs_embed_net::NetworkConfig[][src]

pub struct NetworkConfig {
    pub node_key: Keypair,
    pub node_name: String,
    pub enable_mdns: bool,
    pub allow_non_globals_in_dht: bool,
    pub bitswap_request_timeout: Duration,
    pub bitswap_connection_keepalive: Duration,
    pub bitswap_receive_limit: NonZeroU16,
}

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.

allow_non_globals_in_dht: bool

Should we insert non-global addresses into the DHT?

bitswap_request_timeout: Duration

Bitswap request timeout.

bitswap_connection_keepalive: Duration

Bitswap connection keep alive.

bitswap_receive_limit: NonZeroU16

Bitswap inbound requests per peer limit.

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>,