Trait CellNodes

Source
pub trait CellNodes {
    // Required methods
    fn cell(&self) -> &Cell;
    fn nodes_map(&self) -> &HashMap<NodeId, CellNode>;

    // Provided methods
    fn local_node(&self) -> &LocalNode { ... }
    fn local_cell_node(&self) -> &CellNode { ... }
    fn count(&self) -> usize { ... }
    fn count_with_role(&self, role: CellNodeRole) -> usize { ... }
    fn is_empty(&self) -> bool { ... }
    fn get(&self, node_id: &NodeId) -> Option<&CellNode> { ... }
    fn has_quorum(&self, count: usize, role: Option<CellNodeRole>) -> bool { ... }
    fn to_owned(&self) -> CellNodesOwned { ... }
}
Expand description

Common methods collection of nodes of a Cell

Required Methods§

Source

fn cell(&self) -> &Cell

Source

fn nodes_map(&self) -> &HashMap<NodeId, CellNode>

Provided Methods§

Source

fn local_node(&self) -> &LocalNode

Source

fn local_cell_node(&self) -> &CellNode

Source

fn count(&self) -> usize

Source

fn count_with_role(&self, role: CellNodeRole) -> usize

Source

fn is_empty(&self) -> bool

Source

fn get(&self, node_id: &NodeId) -> Option<&CellNode>

Source

fn has_quorum(&self, count: usize, role: Option<CellNodeRole>) -> bool

Source

fn to_owned(&self) -> CellNodesOwned

Implementors§