pub enum Command {
Database(DatabaseCommand),
Exchange(ExchangeCommand),
Pool(PoolCommand),
Aave(AaveCommand),
Fleet(FleetCommand),
Path(PathCommand),
Strategy(StrategyCommand),
Config(ConfigCommand),
}Expand description
A console command.
Variants§
Database(DatabaseCommand)
The database command group.
Exchange(ExchangeCommand)
The exchange command group.
Pool(PoolCommand)
The pool command group.
Aave(AaveCommand)
The aave command group.
Fleet(FleetCommand)
The fleet command group (ADR-051 D6).
Path(PathCommand)
The path command group (ADR-051 D6).
Strategy(StrategyCommand)
The strategy command group (ADR-055 facets).
Config(ConfigCommand)
The config command group (ADR-062 D6).
Implementations§
Source§impl Command
impl Command
Sourcepub fn prompt_plan(&self, ctx: &CliContext<'_>) -> PromptPlan
pub fn prompt_plan(&self, ctx: &CliContext<'_>) -> PromptPlan
The command’s declared confirmation policy (ADR-051 D4).
Sourcepub fn execute(
&self,
ctx: &CliContext<'_>,
prompter: &dyn Prompter,
) -> Result<CommandReport, CliError>
pub fn execute( &self, ctx: &CliContext<'_>, prompter: &dyn Prompter, ) -> Result<CommandReport, CliError>
Execute the command, asking prompter per the command’s PromptPlan.
The updater arms thread a fresh CancelHandle; use
execute_with_cancel to share the facade’s
SIGINT-driven handle.
§Errors
CliError for a declined prompt, a database failure, a schema refusal,
an unresolved driver-domain value, or a core arm failure.
Sourcepub fn execute_with_cancel(
&self,
ctx: &CliContext<'_>,
prompter: &dyn Prompter,
cancel: &CancelHandle,
) -> Result<CommandReport, CliError>
pub fn execute_with_cancel( &self, ctx: &CliContext<'_>, prompter: &dyn Prompter, cancel: &CancelHandle, ) -> Result<CommandReport, CliError>
Execute the command with the caller’s CancelHandle (ADR-051 D7: the
facade installs the SIGINT policy and hands the handle in).
§Errors
As execute.
Trait Implementations§
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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
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<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