pub trait Policy:
Send
+ Sync
+ 'static {
// Required method
fn policy_type(&self) -> PolicyType;
// Provided methods
fn exempt_roles(&self) -> &[OrganizationUserType] { ... }
fn exempt_providers(&self) -> bool { ... }
fn applicable_statuses(&self) -> &[OrganizationUserStatusType] { ... }
}Expand description
Defines the filtering behavior for a specific policy type.
Implement this trait to control how a policy is enforced.
Required Methods§
Sourcefn policy_type(&self) -> PolicyType
fn policy_type(&self) -> PolicyType
Returns the policy type this definition handles.
Provided Methods§
Sourcefn exempt_roles(&self) -> &[OrganizationUserType]
fn exempt_roles(&self) -> &[OrganizationUserType]
Sourcefn exempt_providers(&self) -> bool
fn exempt_providers(&self) -> bool
Returns whether provider users are exempt from this policy.
Defaults to true.