pub struct Ruleset {
pub target: Target,
pub enforcement: Enforcement,
pub include: Vec<String>,
pub exclude: Vec<String>,
pub bypass_actors: Vec<BypassActor>,
pub rules: Rules,
}Expand description
A GitHub branch or tag ruleset, without its name.
Fields§
§target: TargetThe kind of ref the ruleset covers.
enforcement: EnforcementWhether the ruleset blocks, only reports, or does nothing.
include: Vec<String>Ref patterns the ruleset covers, such as ~DEFAULT_BRANCH.
exclude: Vec<String>Ref patterns the ruleset skips.
bypass_actors: Vec<BypassActor>Actors that may bypass the ruleset.
rules: RulesThe rules the ruleset applies.
Implementations§
Source§impl Ruleset
impl Ruleset
Sourcepub(crate) fn bypassed_by_own_app(&self) -> bool
pub(crate) fn bypassed_by_own_app(&self) -> bool
Whether a bypass actor stands for the App the client acts as.
Sourcepub(crate) fn with_own_app(self, app_id: i64) -> Self
pub(crate) fn with_own_app(self, app_id: i64) -> Self
Give the bypass actors that stand for the acting App its id.
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
Put every list in its comparison order and drop what GitHub fills in.
Source§impl Ruleset
impl Ruleset
fn validate(&self, name: &RulesetName) -> Result<(), ConfigError>
Trait Implementations§
impl Eq for Ruleset
impl StructuralPartialEq for Ruleset
Auto Trait Implementations§
impl Freeze for Ruleset
impl RefUnwindSafe for Ruleset
impl Send for Ruleset
impl Sync for Ruleset
impl Unpin for Ruleset
impl UnsafeUnpin for Ruleset
impl UnwindSafe for Ruleset
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.