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§
Sourcefn evaluate(&self, actor: &CommitParticipant, change: &Inbox) -> bool
fn evaluate(&self, actor: &CommitParticipant, change: &Inbox) -> bool
Evaluates the policy for a given actor and inbox change.
Sourcefn to_proto(&self) -> Result<MembershipPolicyProto, PolicyError>
fn to_proto(&self) -> Result<MembershipPolicyProto, 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.