pub struct Rule {
pub pattern: String,
pub verdict: String,
pub reason: String,
}Expand description
Argv law kept in the pack: a glob over the command line, a verdict, and the reason a reader sees when it fires. The verdict is the rule’s label. A rule that fires is a warning: the action still runs, unless the rule blocks it.
Fields§
§pattern: String§verdict: String§reason: StringImplementations§
Source§impl Rule
impl Rule
Sourcepub fn warning(&self) -> String
pub fn warning(&self) -> String
The one line a harness shows when this rule fires on a call that runs anyway: the rule’s words, then its name.
Sourcepub fn blocks(&self) -> bool
pub fn blocks(&self) -> bool
Whether this rule stops the call. Only the cloud seat push rule
does: a push to a branch outside the allowlist, a force push, or a
remote branch or tag delete. A pack, seat, user or policyd rule,
including one a policyd_config would have blocked, is a warning.
The call runs.
Trait Implementations§
impl Eq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Forget for Rule
impl Freeze for Rule
impl Move for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more