-
Notifications
You must be signed in to change notification settings - Fork 331
Expand file tree
/
Copy pathmod.rs
More file actions
34 lines (31 loc) · 999 Bytes
/
mod.rs
File metadata and controls
34 lines (31 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pub(crate) mod completions;
pub(crate) mod fetch;
pub(crate) mod install;
pub(crate) mod list;
pub(crate) mod man_pages;
pub(crate) mod pin;
pub(crate) mod run;
pub(crate) mod setup;
pub(crate) mod uninstall;
pub(crate) mod r#use;
pub(crate) mod which;
pub(crate) use self::which::Which;
pub(crate) use completions::Completions;
pub(crate) use fetch::Fetch;
pub(crate) use install::Install;
pub(crate) use list::List;
pub(crate) use man_pages::ManPages;
pub(crate) use pin::Pin;
pub(crate) use r#use::Use;
pub(crate) use run::Run;
pub(crate) use setup::Setup;
pub(crate) use uninstall::Uninstall;
use volta_core::error::{ExitCode, Fallible};
use volta_core::session::Session;
/// A Volta command.
pub(crate) trait Command: Sized {
/// Executes the command. Returns `Ok(true)` if the process should return 0,
/// `Ok(false)` if the process should return 1, and `Err(e)` if the process
/// should return `e.exit_code()`.
fn run(self, session: &mut Session) -> Fallible<ExitCode>;
}