Trait distill_importer::Importer [−][src]
Importers parse file formats and produce assets.
Associated Types
type Options: Send + Sync + 'static
[src]
Options can store settings that change importer behaviour. Will be automatically stored in .meta files and passed to Importer::import.
type State: Serialize + Send + 'static
[src]
State is maintained by the asset pipeline to enable Importers to store state between calls to import(). This is primarily used to ensure IDs are stable between imports by storing generated AssetUuids with mappings to format-internal identifiers.
Required methods
fn version_static() -> u32 where
Self: Sized,
[src]
Self: Sized,
Returns the version of the importer. This version should change any time the importer behaviour changes to trigger reimport of assets.
fn version(&self) -> u32
[src]
Returns the version of the importer. This version should change any time the importer behaviour changes to trigger reimport of assets.
fn import(
&self,
op: &mut ImportOp,
source: &mut dyn Read,
options: &Self::Options,
state: &mut Self::State
) -> Result<ImporterValue>
[src]
&self,
op: &mut ImportOp,
source: &mut dyn Read,
options: &Self::Options,
state: &mut Self::State
) -> Result<ImporterValue>
Reads the given bytes and produces assets.
Provided methods
fn export(
&self,
_output: &mut dyn Write,
_options: &Self::Options,
_state: &mut Self::State,
_assets: Vec<ExportAsset>
) -> Result<ImporterValue>
[src]
&self,
_output: &mut dyn Write,
_options: &Self::Options,
_state: &mut Self::State,
_assets: Vec<ExportAsset>
) -> Result<ImporterValue>
Writes a set of assets to a source file format that can be read by import
.