|
|
|
@ -281,6 +281,19 @@ pub enum DistantSubcommand {
|
|
|
|
|
Generate(GenerateSubcommand),
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl DistantSubcommand {
|
|
|
|
|
/// Format used by the subcommand.
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn format(&self) -> Format {
|
|
|
|
|
match self {
|
|
|
|
|
Self::Client(x) => x.format(),
|
|
|
|
|
Self::Manager(x) => x.format(),
|
|
|
|
|
Self::Server(x) => x.format(),
|
|
|
|
|
Self::Generate(x) => x.format(),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Subcommands for `distant client`.
|
|
|
|
|
#[derive(Debug, PartialEq, Subcommand, IsVariant)]
|
|
|
|
|
pub enum ClientSubcommand {
|
|
|
|
@ -539,6 +552,21 @@ impl ClientSubcommand {
|
|
|
|
|
Self::Version { network, .. } => network,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Format used by the subcommand.
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn format(&self) -> Format {
|
|
|
|
|
match self {
|
|
|
|
|
Self::Api { .. } => Format::Json,
|
|
|
|
|
Self::Connect { format, .. } => *format,
|
|
|
|
|
Self::FileSystem(fs) => fs.format(),
|
|
|
|
|
Self::Launch { format, .. } => *format,
|
|
|
|
|
Self::Shell { .. } => Format::Shell,
|
|
|
|
|
Self::Spawn { .. } => Format::Shell,
|
|
|
|
|
Self::SystemInfo { .. } => Format::Shell,
|
|
|
|
|
Self::Version { format, .. } => *format,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Subcommands for `distant fs`.
|
|
|
|
@ -936,6 +964,12 @@ impl ClientFileSystemSubcommand {
|
|
|
|
|
Self::Write { network, .. } => network,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Format used by the subcommand.
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn format(&self) -> Format {
|
|
|
|
|
Format::Shell
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Subcommands for `distant generate`.
|
|
|
|
@ -960,6 +994,14 @@ pub enum GenerateSubcommand {
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl GenerateSubcommand {
|
|
|
|
|
/// Format used by the subcommand.
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn format(&self) -> Format {
|
|
|
|
|
Format::Shell
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Subcommands for `distant manager`.
|
|
|
|
|
#[derive(Debug, PartialEq, Eq, Subcommand, IsVariant)]
|
|
|
|
|
pub enum ManagerSubcommand {
|
|
|
|
@ -1056,6 +1098,22 @@ pub enum ManagerSubcommand {
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl ManagerSubcommand {
|
|
|
|
|
/// Format used by the subcommand.
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn format(&self) -> Format {
|
|
|
|
|
match self {
|
|
|
|
|
Self::Select { format, .. } => *format,
|
|
|
|
|
Self::Service(_) => Format::Shell,
|
|
|
|
|
Self::Listen { .. } => Format::Shell,
|
|
|
|
|
Self::Capabilities { format, .. } => *format,
|
|
|
|
|
Self::Info { format, .. } => *format,
|
|
|
|
|
Self::List { format, .. } => *format,
|
|
|
|
|
Self::Kill { format, .. } => *format,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Subcommands for `distant manager service`.
|
|
|
|
|
#[derive(Debug, PartialEq, Eq, Subcommand, IsVariant)]
|
|
|
|
|
pub enum ManagerServiceSubcommand {
|
|
|
|
@ -1172,6 +1230,14 @@ pub enum ServerSubcommand {
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl ServerSubcommand {
|
|
|
|
|
/// Format used by the subcommand.
|
|
|
|
|
#[inline]
|
|
|
|
|
pub fn format(&self) -> Format {
|
|
|
|
|
Format::Shell
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Args, Debug, PartialEq)]
|
|
|
|
|
pub struct ServerListenWatchOptions {
|
|
|
|
|
/// If specified, will use the polling-based watcher for filesystem changes
|
|
|
|
|