Skip to main content

MembershipPolicy

Trait MembershipPolicy 

pub trait MembershipPolicy: Debug {
    // Required methods
    fn evaluate(&self, actor: &CommitParticipant, change: &Inbox) -> bool;
    fn to_proto(&self) -> Result<MembershipPolicy, PolicyError>;
}
Expand description

A trait for policies that can add/remove members and installations for the group.

Required Methods§

fn evaluate(&self, actor: &CommitParticipant, change: &Inbox) -> bool

Evaluates the policy for a given actor and inbox change.

fn to_proto(&self) -> Result<MembershipPolicy, PolicyError>

Converts the policy to its proto representation.

Implementors§

§

impl MembershipPolicy for BasePolicies

Implements the MembershipPolicy trait for BasePolicies.

§

impl MembershipPolicy for MembershipPolicies

Implements the MembershipPolicy trait for MembershipPolicies.

§

impl MembershipPolicy for AndCondition

Implements the MembershipPolicy trait for AndCondition.

§

impl MembershipPolicy for AnyCondition

Implements the MembershipPolicy trait for AnyCondition.