pub struct Status {
pub id: u64,
pub leader_id: u64,
pub uncommitteds: usize,
pub merger_proposals: usize,
pub sending_raft_messages: isize,
pub timeout_max: isize,
pub timeout_recent_count: isize,
pub propose_count: isize,
pub propose_rate: f64,
pub peers: HashMap<u64, Option<PeerState>>,
pub role: StateRole,
}
Expand description
Struct representing the status of the system.
Fields§
§id: u64
§leader_id: u64
§uncommitteds: usize
§merger_proposals: usize
§sending_raft_messages: isize
§timeout_max: isize
§timeout_recent_count: isize
§propose_count: isize
§propose_rate: f64
§peers: HashMap<u64, Option<PeerState>>
§role: StateRole
Implementations§
Source§impl Status
impl Status
pub fn available(&self) -> bool
Sourcepub fn is_started(&self) -> bool
pub fn is_started(&self) -> bool
Checks if the node has started.
pub fn deserialize_role<'de, D>(deserializer: D) -> Result<StateRole, D::Error>where
D: Deserializer<'de>,
pub fn serialize_role<S>(role: &StateRole, s: S) -> Result<S::Ok, S::Error>where
S: Serializer,
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Status
impl<'de> Deserialize<'de> for Status
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request