pub enum NodeRole {
Coordinator {
bind_addr: String,
},
Worker {
coordinator_addr: String,
},
}Expand description
Describes whether this node is the coordinator (rank 0) or a worker.
The coordinator binds a TCP listener and waits for workers to connect. Workers initiate connections to the coordinator. After the initial handshake every peer can send and receive gradient data symmetrically.
Variants§
Coordinator
The coordinator listens on this address for incoming worker connections. Always corresponds to rank 0.
Worker
A worker connects to the coordinator at this address.
Rank must be in 1..world_size.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeRole
impl RefUnwindSafe for NodeRole
impl Send for NodeRole
impl Sync for NodeRole
impl Unpin for NodeRole
impl UnsafeUnpin for NodeRole
impl UnwindSafe for NodeRole
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more