[][src]Struct fbas_analyzer::Groupings

pub struct Groupings<'fbas> { /* fields omitted */ }

Defines one concrete way to group the nodes of an Fbas, for example by organization, ISP or country. Used for merging nodes belonging to the same group into one.

Implementations

impl<'fbas> Groupings<'fbas>[src]

pub fn merge_node(&self, node_id: NodeId) -> NodeId[src]

Merge a node ID so that all nodes by the same grouping get the same ID.

pub fn merge_node_set(&self, node_set: NodeIdSet) -> NodeIdSet[src]

Merge a node ID set so that all nodes by the same grouping get the same ID.

pub fn merge_node_sets(&self, node_sets: Vec<NodeIdSet>) -> Vec<NodeIdSet>[src]

Merge a list of node ID sets so that all nodes by the same grouping get the same ID.

pub fn merge_minimal_node_sets(
    &self,
    node_sets: Vec<NodeIdSet>
) -> Vec<NodeIdSet>
[src]

Merge a list of node ID sets so that all nodes by the same grouping get the same ID and the returned node sets are all minimal w.r.t. each other (none is a superset of another).

pub fn merge_quorum_set(&self, quorum_set: QuorumSet) -> QuorumSet[src]

Merge a quorum set so that all nodes by the same grouping get the same ID and validator lists consisting of only of one grouping are collapsed into one validator.

pub fn merge_quorum_sets(&self, quorum_set: Vec<QuorumSet>) -> Vec<QuorumSet>[src]

calls merge_quorum_set on each vector element

impl<'fbas> Groupings<'fbas>[src]

pub fn get_by_member(&self, node_id: NodeId) -> Option<&Grouping>[src]

pub fn get_by_name(&self, name: &str) -> Option<&Grouping>[src]

pub fn number_of_groupings(&self) -> usize[src]

impl<'fbas> Groupings<'fbas>[src]

pub fn shrunken(
    orgs: &Self,
    shrink_manager: &ShrinkManager,
    shrunken_fbas: &'fbas Fbas
) -> Self
[src]

impl<'fbas> Groupings<'fbas>[src]

pub fn organizations_from_json_str(orgs_json: &str, fbas: &'fbas Fbas) -> Self[src]

pub fn isps_from_json_str(nodes_json: &str, fbas: &'fbas Fbas) -> Self[src]

pub fn countries_from_json_str(nodes_json: &str, fbas: &'fbas Fbas) -> Self[src]

pub fn organizations_from_json_file(path: &Path, fbas: &'fbas Fbas) -> Self[src]

pub fn isps_from_json_file(path: &Path, fbas: &'fbas Fbas) -> Self[src]

pub fn countries_from_json_file(path: &Path, fbas: &'fbas Fbas) -> Self[src]

Trait Implementations

impl<'fbas> Clone for Groupings<'fbas>[src]

impl<'fbas> Debug for Groupings<'fbas>[src]

impl<'fbas> Eq for Groupings<'fbas>[src]

impl<'fbas> PartialEq<Groupings<'fbas>> for Groupings<'fbas>[src]

impl<'fbas> Serialize for Groupings<'fbas>[src]

impl<'fbas> StructuralEq for Groupings<'fbas>[src]

impl<'fbas> StructuralPartialEq for Groupings<'fbas>[src]

Auto Trait Implementations

impl<'fbas> RefUnwindSafe for Groupings<'fbas>[src]

impl<'fbas> Send for Groupings<'fbas>[src]

impl<'fbas> Sync for Groupings<'fbas>[src]

impl<'fbas> Unpin for Groupings<'fbas>[src]

impl<'fbas> UnwindSafe for Groupings<'fbas>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,