Struct vapcore_network::NetworkConfiguration [−][src]
Network service configuration
Fields
config_path: Option<String>Directory path to store general network configuration. None means nothing will be saved
net_config_path: Option<String>Directory path to store network-specific configuration. None means nothing will be saved
listen_address: Option<SocketAddr>IP address to listen for incoming connections. Listen to all connections by default
public_address: Option<SocketAddr>IP address to advertise. Detected automatically if none.
udp_port: Option<u16>Port for UDP connections, same as TCP by default
nat_enabled: boolEnable NAT configuration
nat_type: NatTypeNat type
discovery_enabled: boolEnable discovery
boot_nodes: Vec<String>List of initial node addresses
use_secret: Option<Secret>Use provided node key instead of default
min_peers: u32Minimum number of connected peers to maintain
max_peers: u32Maximum allowed number of peers
max_handshakes: u32Maximum handshakes
reserved_protocols: HashMap<ProtocolId, u32>Reserved protocols. Peers with
reserved_nodes: Vec<String>List of reserved node addresses.
non_reserved_mode: NonReservedPeerModeThe non-reserved peer mode.
ip_filter: IpFilterIP filter
client_version: StringClient identifier
Implementations
impl NetworkConfiguration[src]
pub fn new() -> Self[src]
Create a new instance of default settings.
pub fn new_with_port(port: u16) -> NetworkConfiguration[src]
Create new default configuration with specified listen port.
pub fn new_local() -> NetworkConfiguration[src]
Create new default configuration for localhost-only connection with random port (usefull for testing)
Trait Implementations
impl Clone for NetworkConfiguration[src]
fn clone(&self) -> NetworkConfiguration[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for NetworkConfiguration[src]
impl Default for NetworkConfiguration[src]
impl PartialEq<NetworkConfiguration> for NetworkConfiguration[src]
fn eq(&self, other: &NetworkConfiguration) -> bool[src]
fn ne(&self, other: &NetworkConfiguration) -> bool[src]
impl StructuralPartialEq for NetworkConfiguration[src]
Auto Trait Implementations
impl RefUnwindSafe for NetworkConfiguration
impl Send for NetworkConfiguration
impl Sync for NetworkConfiguration
impl Unpin for NetworkConfiguration
impl UnwindSafe for NetworkConfiguration
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,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,