pub enum RuleFormat {
Agents,
Cursor,
Windsurf,
Copilot,
Cline,
Claude,
Jetbrains,
AmazonQ,
Auto,
}Expand description
Supported agent rule file formats.
Variants§
Agents
Canonical agent-rules-spec format.
Cursor
Cursor .cursor/rules format.
Windsurf
Windsurf .windsurf/rules format.
Copilot
GitHub Copilot .github/instructions format.
Cline
Cline .clinerules format.
Claude
Claude .claude/rules format.
Jetbrains
JetBrains AI Assistant format.
AmazonQ
Amazon Q format.
Auto
Detect format from frontmatter or path.
Implementations§
Source§impl RuleFormat
impl RuleFormat
Sourcepub fn default_output_dir(self) -> &'static str
pub fn default_output_dir(self) -> &'static str
Default output directory for this format when translating to disk.
Sourcepub fn detect_from_frontmatter(frontmatter: &Value) -> RuleFormat
pub fn detect_from_frontmatter(frontmatter: &Value) -> RuleFormat
Infer format from frontmatter shape (heuristic field matching).
Sourcepub fn resolve(self, frontmatter: &Value) -> RuleFormat
pub fn resolve(self, frontmatter: &Value) -> RuleFormat
Resolve RuleFormat::Auto via Self::detect_from_frontmatter; otherwise return self.
Trait Implementations§
Source§impl Clone for RuleFormat
impl Clone for RuleFormat
Source§fn clone(&self) -> RuleFormat
fn clone(&self) -> RuleFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RuleFormat
Source§impl Debug for RuleFormat
impl Debug for RuleFormat
impl Eq for RuleFormat
Source§impl From<RuleFormatArg> for RuleFormat
impl From<RuleFormatArg> for RuleFormat
Source§fn from(arg: RuleFormatArg) -> Self
fn from(arg: RuleFormatArg) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RuleFormat
impl PartialEq for RuleFormat
Source§fn eq(&self, other: &RuleFormat) -> bool
fn eq(&self, other: &RuleFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RuleFormat
Auto Trait Implementations§
impl Freeze for RuleFormat
impl RefUnwindSafe for RuleFormat
impl Send for RuleFormat
impl Sync for RuleFormat
impl Unpin for RuleFormat
impl UnsafeUnpin for RuleFormat
impl UnwindSafe for RuleFormat
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Compare self to
key and return true if they are equal.