Skip to main content

ReviewCommand

Enum ReviewCommand 

Source
pub enum ReviewCommand {
    Create {
        name: String,
    },
    Start {
        name: String,
    },
    List,
    Show {
        name: String,
        json: bool,
    },
    SetState {
        name: String,
        state: StateArg,
    },
    AddComment {
        name: String,
        file: String,
        side: SideArg,
        old_line: Option<u32>,
        new_line: Option<u32>,
        body: String,
        author: AuthorArg,
    },
    AddReply {
        name: String,
        comment_id: u64,
        body: String,
        author: AuthorArg,
    },
    MarkAddressed {
        name: String,
        comment_id: u64,
        author: AuthorArg,
    },
    MarkOpen {
        name: String,
        comment_id: u64,
        author: AuthorArg,
    },
    RunAiSession {
        name: String,
        provider: AiProviderArg,
        mode: Option<AiSessionModeArg>,
        comment_ids: Vec<u64>,
    },
}

Variants§

§

Create

Fields

§name: String
§

Start

Fields

§name: String
§

List

§

Show

Fields

§name: String
§json: bool

Print review details as pretty JSON.

§

SetState

Fields

§name: String
§state: StateArg
§

AddComment

Fields

§name: String
§file: String

File path for the comment location.

§side: SideArg

Diff side for the comment location (left or right).

§old_line: Option<u32>

Line number on the old (left) side of the diff.

§new_line: Option<u32>

Line number on the new (right) side of the diff.

§body: String

Comment text body.

§author: AuthorArg

Comment author (user or ai, default: user).

§

AddReply

Fields

§name: String
§comment_id: u64

Target comment id to reply to.

§body: String

Reply text body.

§author: AuthorArg

Reply author (user or ai, default: ai).

§

MarkAddressed

Fields

§name: String
§comment_id: u64

Target comment id to mark as addressed.

§author: AuthorArg

Actor marking the comment (user or ai, default: user).

§

MarkOpen

Fields

§name: String
§comment_id: u64

Target comment id to mark as open.

§author: AuthorArg

Actor reopening the comment (user or ai, default: user).

§

RunAiSession

Fields

§name: String
§provider: AiProviderArg

AI provider to run for the session.

§mode: Option<AiSessionModeArg>

Session mode override (for example reply or refactor).

§comment_ids: Vec<u64>

One or more comment ids to target (repeat --comment-id).

Trait Implementations§

Source§

impl CommandFactory for ReviewCommand

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for ReviewCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for ReviewCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for ReviewCommand

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.
Source§

impl Subcommand for ReviewCommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more