pub enum PolicyId {
RequireRoot,
LinkedWorktreeOnly,
BranchWorktreeOnly,
AddExplicit,
FinalNewline,
MarkdownAutofix,
ForbiddenRootContext,
DependentVersionBump,
ForbiddenStrings,
}Expand description
What: One variant per shipped policy; the variant is the policy’s identity in Rust. Why: Typed identities let options and settings be looked up without string comparison.
In TS you’d write (pseudocode):
type PolicyId = 'require-root' | 'linked-worktree-only' | ... | 'security/forbidden-strings';Variants§
RequireRoot
require-root:
repository-root working directory requirement.
LinkedWorktreeOnly
linked-worktree-only:
destructive commands stay in linked worktrees.
BranchWorktreeOnly
branch-worktree-only:
branch creation goes through git worktree add.
AddExplicit
add-explicit:
bulk staging patterns are rejected.
FinalNewline
final-newline:
text candidates end with one line feed.
MarkdownAutofix
markdown/autofix:
commit-time Markdown normalization.
ForbiddenRootContext
mono/forbidden-root-context:
no root CONTEXT.md enters a commit.
DependentVersionBump
mono/dependent-version-bump:
dependent package versions follow a bumped package.
ForbiddenStrings
security/forbidden-strings:
candidate bytes are scanned by the bundled scanner.
Trait Implementations§
impl Copy for PolicyId
impl Eq for PolicyId
impl StructuralPartialEq for PolicyId
Auto Trait Implementations§
impl Freeze for PolicyId
impl RefUnwindSafe for PolicyId
impl Send for PolicyId
impl Sync for PolicyId
impl Unpin for PolicyId
impl UnsafeUnpin for PolicyId
impl UnwindSafe for PolicyId
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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