Skip to main content

CoatingSource

Trait CoatingSource 

Source
pub trait CoatingSource: Send + Sync {
    // Required methods
    fn extensions(&self) -> &[&str];
    fn load(&self, path: &Path) -> Result<CoatingSet, Error>;
}
Expand description

膜のファイル形式(拡張子ごとの読み手)。膜ファイルのフォルダの <膜の名前>.<拡張子> を膜の名前で読む。 明示して読むファイル(crate::coating::Coatings::load_file)も拡張子でこの読み手を選ぶ

Required Methods§

Source

fn extensions(&self) -> &[&str]

この実装が読める拡張子(小文字、ドットなし)。同梱の形式(lbcb・lbcm・lbct・lbcs)と同じなら、こちらが勝つ

Source

fn load(&self, path: &Path) -> Result<CoatingSet, Error>

ファイルを読み、膜の組を返す(読めなければ Error::Io、中身の誤りは Error::Invalid など)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§