Skip to main content

MembershipPolicy

Trait MembershipPolicy 

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

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

Required Methods§

Source

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

Evaluates the policy for a given actor and inbox change.

Source

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

Converts the policy to its proto representation.

Implementors§

Source§

impl MembershipPolicy for BasePolicies

Implements the MembershipPolicy trait for BasePolicies.

Source§

impl MembershipPolicy for MembershipPolicies

Implements the MembershipPolicy trait for MembershipPolicies.

Source§

impl MembershipPolicy for AndCondition

Implements the MembershipPolicy trait for AndCondition.

Source§

impl MembershipPolicy for AnyCondition

Implements the MembershipPolicy trait for AnyCondition.