pub struct ChaincraftNodeBuilder { /* private fields */ }Expand description
Builder for Chaincraft nodes
Implementations§
Source§impl ChaincraftNodeBuilder
impl ChaincraftNodeBuilder
Sourcepub fn with_storage(self, storage: Arc<dyn Storage>) -> Self
pub fn with_storage(self, storage: Arc<dyn Storage>) -> Self
Set the storage backend
Sourcepub fn with_persistent_storage(self, persistent: bool) -> Self
pub fn with_persistent_storage(self, persistent: bool) -> Self
Set persistent storage option
Sourcepub fn with_config(self, config: NodeConfig) -> Self
pub fn with_config(self, config: NodeConfig) -> Self
Set the node configuration
Sourcepub fn local_discovery(self, enabled: bool) -> Self
pub fn local_discovery(self, enabled: bool) -> Self
Enable or disable local discovery
Sourcepub fn persist_peers(self, enabled: bool) -> Self
pub fn persist_peers(self, enabled: bool) -> Self
Enable or disable persisting peers to storage
Sourcepub fn build(self) -> Result<ChaincraftNode>
pub fn build(self) -> Result<ChaincraftNode>
Build the node
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChaincraftNodeBuilder
impl !RefUnwindSafe for ChaincraftNodeBuilder
impl Send for ChaincraftNodeBuilder
impl Sync for ChaincraftNodeBuilder
impl Unpin for ChaincraftNodeBuilder
impl UnsafeUnpin for ChaincraftNodeBuilder
impl !UnwindSafe for ChaincraftNodeBuilder
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