pub enum Command {
Init {
path: PathBuf,
tree: Option<SpaceTreeId>,
},
Wdir {
space: String,
},
ListSpaces,
ListTrees,
RemoveSpace {
space: String,
},
Go {
space: String,
},
Edit {
space: String,
wdir: Option<PathBuf>,
tree: Option<SpaceTreeId>,
},
NewTree {
name: String,
},
RemoveTree {
name: String,
},
}
Variants§
Init
Initializes a new development space.
Fields
§
tree: Option<SpaceTreeId>
What treee of Space it is, how to launch it.
Defaults to the default set in the config.
Wdir
Prints (to stdout) the working directory of a Space.
ListSpaces
Lists all the Spaces stored.
Returns a non-zero exit code if there is no spaces stored.
ListTrees
Lists all the Trees configured.
Returns a non-zero exit code if there is no spaces stored.
RemoveSpace
Removes the Space with the given name.
Go
Go to the Space with the given name.
If the Space has already been launched the Space isn’t recreated.
Edit
Edit a space config.
Fields
§
tree: Option<SpaceTreeId>
The new tree of the Space.
NewTree
Interactive tree creation.
It overwrites the Tree if there is already a tree with this name.
RemoveTree
Removes the Tree with the given name.
Trait Implementations§
Source§impl CommandFactory for Command
impl CommandFactory for Command
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
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>
Assign values from
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>
Assign values from
ArgMatches
to self
.Source§impl Parser for Command
impl Parser for Command
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Source§impl Subcommand for Command
impl Subcommand for Command
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
Append to
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
Test whether
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin 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
Mutably borrows from an owned value. Read more