pub trait Source {
// Required methods
fn is_project(&self) -> bool;
fn states(&self) -> Result<Vec<String>>;
fn state(&self) -> Option<String>;
fn paths(&self) -> Result<Vec<String>>;
fn path(&self) -> Option<String>;
fn load(&self, v: &Variant, notes: &mut Vec<String>) -> Result<System>;
fn project_text(&self) -> Result<Option<String>>;
fn system_hash(&self, s: &System) -> Result<String>;
// Provided methods
fn beams(&self) -> Result<Vec<String>> { ... }
fn variant(&self, beam: &str, notes: &mut Vec<String>) -> Result<System> { ... }
}Expand description
系の読み方(CLI はコマンドラインの引数、serve は load で選んだもの)。干渉の 2 つの光束・系の一覧の解析が使う
Required Methods§
Sourcefn is_project(&self) -> bool
fn is_project(&self) -> bool
プロジェクトファイル(光束・状態を名前で選ぶ)か。.zmx・系ファイルなら false
Sourcefn load(&self, v: &Variant, notes: &mut Vec<String>) -> Result<System>
fn load(&self, v: &Variant, notes: &mut Vec<String>) -> Result<System>
別の読み方(光束・追跡する波長)で読んだ系。serve では読み込んだ後の変更(set・edit)も当て、当てなかった変更は notes に書く
Sourcefn project_text(&self) -> Result<Option<String>>
fn project_text(&self) -> Result<Option<String>>
プロジェクトファイルの JSON の文字列(状態は当てない。.zmx・系ファイルなら None)
Sourcefn system_hash(&self, s: &System) -> Result<String>
fn system_hash(&self, s: &System) -> Result<String>
系の hash(系ファイルの形の。結果・書き出しの provenance に刻む)
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".