petri_artifacts_core

Trait ResolveTestArtifact

Source
pub trait ResolveTestArtifact {
    // Required method
    fn resolve(&self, id: ErasedArtifactHandle) -> Result<PathBuf>;
}
Expand description

A trait to resolve artifacts to paths.

Test authors are expected to use the TestArtifactRequirements and TestArtifacts abstractions to interact with artifacts, and should not use this API directly.

Required Methods§

Source

fn resolve(&self, id: ErasedArtifactHandle) -> Result<PathBuf>

Given an artifact handle, return its corresponding PathBuf.

This method must use type-erased handles, as using typed artifact handles in this API would cause the trait to no longer be object-safe.

Implementations on Foreign Types§

Source§

impl<T: ResolveTestArtifact + ?Sized> ResolveTestArtifact for &T

Implementors§