pub enum MdAction {
ReplaceSection {
file: String,
heading: String,
stdin: bool,
content: Option<String>,
},
InsertAfterHeading {
file: String,
heading: String,
stdin: bool,
content: Option<String>,
},
InsertAfterSection {
file: String,
heading: String,
stdin: bool,
content: Option<String>,
},
InsertBeforeHeading {
file: String,
heading: String,
stdin: bool,
content: Option<String>,
},
UpsertBullet {
file: String,
heading: String,
bullet: String,
},
DedupeHeadings {
file: String,
},
LintAgents {
file: String,
},
TableAppend {
file: String,
heading: String,
row: String,
},
MoveSection {
file: String,
heading: String,
to: Option<String>,
before: Option<String>,
after: Option<String>,
},
}Variants§
ReplaceSection
Replace a heading section body (until next same-or-higher heading).
Nested lower-level headings under the match are included (e.g. # Intro
owns following ## sections until the next #). Prefer peer-level
headings when sibling sections must survive.
Fields
InsertAfterHeading
Insert content immediately after a heading line (before existing body).
Does not insert after the full section body. For a sibling section after
the section ends, use insert-after-section (#1726).
Fields
InsertAfterSection
Insert content after the full section body (sibling placement).
Use when adding a new ## section after this section’s content. Prefer
insert-after-heading only for content under the heading (e.g. intro
before a table). #1726
Fields
InsertBeforeHeading
Insert content immediately before a heading line.
Alias insert-before-section: a section starts at its heading, so
sibling-before-section placement is the same as before-heading
(symmetry with insert-after-section / insert-after-heading).
Fields
UpsertBullet
Add a bullet under a heading if not already present.
Fields
DedupeHeadings
Remove later whole sections with a duplicate heading (level+text).
Drops heading and body until the next same-or-higher heading; unique content under the second heading is not kept.
LintAgents
Lint common AGENTS.md problems.
TableAppend
Append a row to a markdown table under a heading.
Fields
MoveSection
Move a heading section to a new location (same file or different file).
Fields
Trait Implementations§
Source§impl FromArgMatches for MdAction
impl FromArgMatches for MdAction
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for MdAction
impl Subcommand for MdAction
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for MdAction
impl RefUnwindSafe for MdAction
impl Send for MdAction
impl Sync for MdAction
impl Unpin for MdAction
impl UnsafeUnpin for MdAction
impl UnwindSafe for MdAction
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> 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