pub struct PreparedNode { /* private fields */ }Expand description
A Node that has been configured but not yet connected to its peers.
Created by Node::builder. Call endpoint to obtain the local
connection information, exchange endpoints with all peers, then call
gather_endpoints followed by handshake
to finish the connections.
Implementations§
Source§impl PreparedNode
impl PreparedNode
Sourcepub fn endpoint(&self) -> LocalEndpoint
pub fn endpoint(&self) -> LocalEndpoint
Returns this node’s local endpoint information to be exchanged with all peers.
Sourcepub fn gather_endpoints(
&self,
endpoints: impl IntoIterator<Item = LocalEndpoint>,
) -> Result<RemoteEndpoints>
pub fn gather_endpoints( &self, endpoints: impl IntoIterator<Item = LocalEndpoint>, ) -> Result<RemoteEndpoints>
Collects and validates endpoints received from all peers.
Each peer’s LocalEndpoint must appear exactly once. Returns an error if
any rank is out of bounds, duplicated, or missing.
Auto Trait Implementations§
impl Freeze for PreparedNode
impl RefUnwindSafe for PreparedNode
impl Send for PreparedNode
impl Sync for PreparedNode
impl Unpin for PreparedNode
impl UnsafeUnpin for PreparedNode
impl UnwindSafe for PreparedNode
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