[][src]Enum sc_network::config::TransportConfig

pub enum TransportConfig {
    Normal {
        enable_mdns: bool,
        allow_private_ipv4: bool,
        wasm_external_transport: Option<ExtTransport>,

Configuration for the transport layer.



Normal transport mode.

Fields of Normal

enable_mdns: bool

If true, the network will use mDNS to discover other libp2p nodes on the local network and connect to them if they support the same chain.

allow_private_ipv4: bool

If true, allow connecting to private IPv4 addresses (as defined in RFC1918). Irrelevant for addresses that have been passed in NetworkConfiguration::reserved_nodes or NetworkConfiguration::boot_nodes.

wasm_external_transport: Option<ExtTransport>

Optional external implementation of a libp2p transport. Used in WASM contexts where we need some binding between the networking provided by the operating system or environment and libp2p.

This parameter exists whatever the target platform is, but it is expected to be set to Some only when compiling for WASM.


Only allow connections within the same process. Only addresses of the form /memory/... will be supported.

Trait Implementations

impl Clone for TransportConfig[src]

impl Debug for TransportConfig[src]

Auto Trait Implementations

impl RefUnwindSafe for TransportConfig

impl Send for TransportConfig

impl Sync for TransportConfig

impl Unpin for TransportConfig

impl UnwindSafe for TransportConfig

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> CheckedConversion for T[src]

impl<T> DynClone for T where
    T: Clone

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded

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

impl<T> WithSubscriber for T[src]