use std::time::Duration;
use crate::RaftTypeConfig;
use crate::errors::RPCError;
#[derive(Debug, thiserror::Error)]
pub(crate) enum HeartbeatFailure<C>
where C: RaftTypeConfig
{
#[error(transparent)]
Rpc(RPCError<C>),
#[error("the response stream ended without a response")]
NoResponse,
#[error("no response within {0:?}")]
Timeout(Duration),
}