Enum sc_network::config::TransportConfig [−][src]
pub enum TransportConfig { Normal { enable_mdns: bool, allow_private_ipv4: bool, wasm_external_transport: Option<ExtTransport>, }, MemoryOnly, }
Configuration for the transport layer.
Variants
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,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> CheckedConversion for T
[src][+]
impl<T> DynClone for T where
T: Clone,
[src][+]
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>,
[src][+]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src][+]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Pointable for T
[src][+]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
[src][+]
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src][+]
T: UncheckedFrom<S>,
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src][+]
T: Bounded,
S: TryInto<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,