pub fn new(configs: Vec<BTreeSet<C::NodeId>>, learners: Option<BTreeSet<C::NodeId>>) -> Self {
        let all_members = Self::build_all_members(&configs);
        let learners = learners.unwrap_or_default();
        let learners = learners.difference(&all_members).cloned().collect::<BTreeSet<_>>();

        Membership {
            learners,
            configs,
            nodes: None,
        }
    }
/// Create a new Membership of multiple configs(joint) and optinally a set of learners
///
/// A learner that is already in configs will be filtered out.
Create a new Membership of multiple configs(joint) and optinally a set of learners
A learner that is already in configs will be filtered out.
Create a new Membership of multiple configs ( joint ) and optinally a set of learners A learner that is already in configs will be filtered out .
pub fn new(configs: Vec<BTreeSet<C::NodeId>>, learners: Option<BTreeSet<C::NodeId>>) -> Self {
        let all_members = Self::build_all_members(&configs);
        let learners = learners.unwrap_or_default();
        let learners = learners.difference(&all_members).cloned().collect::<BTreeSet<_>>();
        Membership {
            learners,
            configs,
            nodes: None,
        }
    }
pub fn new ( configs : Vec < BTreeSet < C :: NodeId > > , learners : Option < BTreeSet < C :: NodeId > > ) -> Self { let all_members = Self :: build_all_members ( & configs ) ; let learners = learners . unwrap_or_default ( ) ; let learners = learners . difference ( & all_members ) . cloned ( ) . collect :: < BTreeSet < _ > > ( ) ; Membership { learners , configs , nodes : None , } }
Create a new Membership of multiple configs(joint) and optinally a set of learners
A learner that is already in configs will be filtered out.
Create a new Membership of multiple configs ( joint ) and optinally a set of learners A learner that is already in configs will be filtered out .
configs
Vec<BTreeSet<C::NodeId>>
learners
Option<BTreeSet<C::NodeId>>