pub struct NodeBuilder { /* private fields */ }
Expand description
Builder pattern for creating P2P nodes
Implementations§
Source§impl NodeBuilder
impl NodeBuilder
Sourcepub fn with_peer_id(self, peer_id: PeerId) -> Self
pub fn with_peer_id(self, peer_id: PeerId) -> Self
Set the peer ID
Sourcepub fn with_bootstrap_peer(self, addr: &str) -> Self
pub fn with_bootstrap_peer(self, addr: &str) -> Self
Add a bootstrap peer
Sourcepub fn with_mcp_server(self) -> Self
pub fn with_mcp_server(self) -> Self
Enable MCP server
Sourcepub fn with_mcp_config(self, mcp_config: MCPServerConfig) -> Self
pub fn with_mcp_config(self, mcp_config: MCPServerConfig) -> Self
Configure MCP server settings
Sourcepub fn with_connection_timeout(self, timeout: Duration) -> Self
pub fn with_connection_timeout(self, timeout: Duration) -> Self
Set connection timeout
Sourcepub fn with_max_connections(self, max: usize) -> Self
pub fn with_max_connections(self, max: usize) -> Self
Set maximum connections
Sourcepub fn with_production_mode(self) -> Self
pub fn with_production_mode(self) -> Self
Enable production mode with default configuration
Sourcepub fn with_production_config(self, production_config: ProductionConfig) -> Self
pub fn with_production_config(self, production_config: ProductionConfig) -> Self
Configure production settings
Auto Trait Implementations§
impl Freeze for NodeBuilder
impl RefUnwindSafe for NodeBuilder
impl Send for NodeBuilder
impl Sync for NodeBuilder
impl Unpin for NodeBuilder
impl UnwindSafe for NodeBuilder
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