pub struct NodeConfigBuilder { /* private fields */ }Expand description
Builder for NodeConfig
Implementations§
Source§impl NodeConfigBuilder
impl NodeConfigBuilder
Sourcepub fn bind_addr(self, addr: SocketAddr) -> Self
pub fn bind_addr(self, addr: SocketAddr) -> Self
Set the bind address
Sourcepub fn known_peer(self, addr: SocketAddr) -> Self
pub fn known_peer(self, addr: SocketAddr) -> Self
Add a known peer
Sourcepub fn known_peers(self, addrs: impl IntoIterator<Item = SocketAddr>) -> Self
pub fn known_peers(self, addrs: impl IntoIterator<Item = SocketAddr>) -> Self
Add multiple known peers
Sourcepub fn keypair(
self,
public_key: MlDsaPublicKey,
secret_key: MlDsaSecretKey,
) -> Self
pub fn keypair( self, public_key: MlDsaPublicKey, secret_key: MlDsaSecretKey, ) -> Self
Set the identity keypair (ML-DSA-65)
Sourcepub fn build(self) -> NodeConfig
pub fn build(self) -> NodeConfig
Build the configuration
Trait Implementations§
Source§impl Default for NodeConfigBuilder
impl Default for NodeConfigBuilder
Source§fn default() -> NodeConfigBuilder
fn default() -> NodeConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NodeConfigBuilder
impl RefUnwindSafe for NodeConfigBuilder
impl Send for NodeConfigBuilder
impl Sync for NodeConfigBuilder
impl Unpin for NodeConfigBuilder
impl UnwindSafe for NodeConfigBuilder
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