pub enum Commands {
Show 14 variants
Run {
file: PathBuf,
args: Vec<String>,
watch: bool,
allow_all: bool,
allow_net: bool,
allow_read: bool,
allow_write: bool,
},
Query {
query: String,
params: Option<PathBuf>,
format: String,
interactive: bool,
},
Rewrite {
input: PathBuf,
rules: PathBuf,
output: Option<PathBuf>,
strategy: String,
},
Check {
files: Vec<PathBuf>,
all: bool,
fix: bool,
},
Fmt {
files: Vec<PathBuf>,
all: bool,
check: bool,
config: Option<PathBuf>,
},
Info {
detailed: bool,
json: bool,
},
Task {
task: Option<String>,
file: Option<PathBuf>,
list: bool,
},
Repl {
history: Option<PathBuf>,
graph: Option<PathBuf>,
},
Compile {
input: PathBuf,
output: Option<PathBuf>,
target: String,
optimize: u8,
},
Generate {
generator: GeneratorType,
schema: Option<PathBuf>,
output: Option<PathBuf>,
lang: String,
},
Server {
port: u16,
host: String,
config: Option<PathBuf>,
tls: bool,
cert: Option<PathBuf>,
key: Option<PathBuf>,
},
Doc {
input: Option<PathBuf>,
output: PathBuf,
format: String,
open: bool,
},
Init {
name: Option<String>,
template: String,
force: bool,
},
Version,
}Expand description
Kotoba CLIのサブコマンド
Variants§
Run
.kotobaファイルを実行
Fields
Query
GQLクエリを実行
Fields
Rewrite
グラフ書換えルールを適用
Fields
Check
ファイルを検証
Fmt
ファイルをフォーマット
Fields
Info
プロジェクト/グラフ情報を表示
Task
Jsonnetタスクを実行
Repl
インタラクティブGQL REPL
Compile
ファイルをコンパイル/変換
Fields
Generate
コードを生成
Fields
§
generator: GeneratorType生成タイプ (types, client, server, docs)
Server
HTTPサーバーを起動
Fields
Doc
ドキュメント生成
Fields
Init
新規プロジェクトを初期化
Fields
Version
バージョン情報を表示
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
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 Subcommand for Commands
impl Subcommand for Commands
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 Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnsafeUnpin for Commands
impl UnwindSafe for Commands
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