//! What a node is in a cluster
use Deserialize;
use Serialize;
/// Whether a node votes
///
/// The two roles differ in one thing, and everything else follows from it: a voter is counted in
/// the quorum a write must reach, a learner is not. So voters are what makes a cluster survive
/// failures - three tolerate one, five tolerate two - and learners are replicas that cost a write
/// nothing, because it never waits for them.
///
/// A node always *enters* a cluster as a learner, whichever role it is headed for. See
/// [`EzRaft::join`](crate::EzRaft::join) for why that is forced rather than chosen.