pub trait WorldCodec<W> {
// Required methods
fn compile(
&self,
home: &Path,
) -> Result<(W, Vec<ArtifactFidelity>), InterchangeError>;
fn decompile(
&self,
world: &W,
dest: &Path,
) -> Result<Vec<ArtifactFidelity>, InterchangeError>;
}Expand description
A harness’s operational home compiled into a world value and back.
Required Methods§
Sourcefn compile(
&self,
home: &Path,
) -> Result<(W, Vec<ArtifactFidelity>), InterchangeError>
fn compile( &self, home: &Path, ) -> Result<(W, Vec<ArtifactFidelity>), InterchangeError>
Read a home into the world value, naming what each artifact reached.
Sourcefn decompile(
&self,
world: &W,
dest: &Path,
) -> Result<Vec<ArtifactFidelity>, InterchangeError>
fn decompile( &self, world: &W, dest: &Path, ) -> Result<Vec<ArtifactFidelity>, InterchangeError>
Write the world value as this harness’s home, naming what each artifact reached; a write that would have to guess is an error naming its gate.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".