pub struct NetworkConfig { /* private fields */ }Expand description
Network adapters selected for one installation.
Implementations§
Source§impl NetworkConfig
impl NetworkConfig
Sourcepub fn new(peer_transport: ProviderId, command_transport: ProviderId) -> Self
pub fn new(peer_transport: ProviderId, command_transport: ProviderId) -> Self
Creates network configuration using explicit transport providers.
Sourcepub fn with_listen_address(
self,
address: impl Into<String>,
) -> ContractResult<Self>
pub fn with_listen_address( self, address: impl Into<String>, ) -> ContractResult<Self>
Adds a listen address owned by this installation.
Sourcepub fn with_tls(self, tls: TlsConfig) -> ContractResult<Self>
pub fn with_tls(self, tls: TlsConfig) -> ContractResult<Self>
Replaces TLS settings.
Sourcepub fn listen_addresses(&self) -> &[String]
pub fn listen_addresses(&self) -> &[String]
Returns listen addresses.
Sourcepub fn peer_transport(&self) -> &ProviderId
pub fn peer_transport(&self) -> &ProviderId
Returns the peer transport provider.
Sourcepub fn command_transport(&self) -> &ProviderId
pub fn command_transport(&self) -> &ProviderId
Returns the command transport provider.
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NetworkConfig
impl Debug for NetworkConfig
Source§impl<'de> Deserialize<'de> for NetworkConfig
impl<'de> Deserialize<'de> for NetworkConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NetworkConfig
Source§impl PartialEq for NetworkConfig
impl PartialEq for NetworkConfig
Source§impl Serialize for NetworkConfig
impl Serialize for NetworkConfig
impl StructuralPartialEq for NetworkConfig
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnsafeUnpin for NetworkConfig
impl UnwindSafe for NetworkConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more