Skip to main content

Commands

Enum Commands 

Source
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

§file: PathBuf

実行するファイル

§args: Vec<String>

引数

§watch: bool

ウォッチモード

§allow_all: bool

許可する権限

§allow_net: bool

ネットワークアクセスを許可

§allow_read: bool

ファイルシステムアクセスを許可

§allow_write: bool

書き込みアクセスを許可

§

Query

GQLクエリを実行

Fields

§query: String

クエリファイルまたはクエリ文字列

§params: Option<PathBuf>

パラメータファイル

§format: String

出力フォーマット (json, graphson, text)

§interactive: bool

インタラクティブモード

§

Rewrite

グラフ書換えルールを適用

Fields

§input: PathBuf

入力グラフファイル

§rules: PathBuf

ルールファイル

§output: Option<PathBuf>

出力ファイル

§strategy: String

戦略 (once, exhaust, while, seq)

§

Check

ファイルを検証

Fields

§files: Vec<PathBuf>

検証するファイル

§all: bool

すべてのファイルをチェック

§fix: bool

修正を適用

§

Fmt

ファイルをフォーマット

Fields

§files: Vec<PathBuf>

フォーマットするファイル

§all: bool

すべてのファイルをフォーマット

§check: bool

チェックのみ(変更しない)

§config: Option<PathBuf>

設定ファイル

§

Info

プロジェクト/グラフ情報を表示

Fields

§detailed: bool

詳細表示

§json: bool

JSON形式で出力

§

Task

Jsonnetタスクを実行

Fields

§task: Option<String>

タスク名

§file: Option<PathBuf>

タスクファイル

§list: bool

タスクリストを表示

§

Repl

インタラクティブGQL REPL

Fields

§history: Option<PathBuf>

履歴ファイル

§graph: Option<PathBuf>

初期グラフファイル

§

Compile

ファイルをコンパイル/変換

Fields

§input: PathBuf

入力ファイル

§output: Option<PathBuf>

出力ファイル

§target: String

ターゲット言語 (typescript, rust, json, graphson)

§optimize: u8

最適化レベル

§

Generate

コードを生成

Fields

§generator: GeneratorType

生成タイプ (types, client, server, docs)

§schema: Option<PathBuf>

スキーマファイル

§output: Option<PathBuf>

出力ディレクトリ

§lang: String

言語 (typescript, rust, python)

§

Server

HTTPサーバーを起動

Fields

§port: u16

ポート番号

§host: String

ホスト

§config: Option<PathBuf>

設定ファイル

§tls: bool

TLS有効化

§cert: Option<PathBuf>

証明書ファイル

§key: Option<PathBuf>

秘密鍵ファイル

§

Doc

ドキュメント生成

Fields

§input: Option<PathBuf>

入力ファイル

§output: PathBuf

出力ディレクトリ

§format: String

フォーマット (html, markdown, json)

§open: bool

ブラウザで開く

§

Init

新規プロジェクトを初期化

Fields

§name: Option<String>

プロジェクト名

§template: String

テンプレート (basic, web, api, fullstack)

§force: bool

初期化を強制

§

Version

バージョン情報を表示

Trait Implementations§

Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

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>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

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 more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,