pub struct ArtifactResolver<'a>(/* private fields */);Expand description
An artifact resolver, used both to express requirements for artifacts and to resolve them to paths.
Implementations§
Source§impl<'a> ArtifactResolver<'a>
impl<'a> ArtifactResolver<'a>
Sourcepub fn collector(
requirements: &'a mut TestArtifactRequirements,
) -> ArtifactResolver<'a>
pub fn collector( requirements: &'a mut TestArtifactRequirements, ) -> ArtifactResolver<'a>
Returns a resolver to collect requirements; the artifact objects returned by
require will panic if used.
Sourcepub fn resolver(artifacts: &'a TestArtifacts) -> ArtifactResolver<'a>
pub fn resolver(artifacts: &'a TestArtifacts) -> ArtifactResolver<'a>
Returns a resolver to resolve artifacts.
Sourcepub fn require<A>(&self, handle: ArtifactHandle<A>) -> ResolvedArtifact<A>where
A: ArtifactId,
pub fn require<A>(&self, handle: ArtifactHandle<A>) -> ResolvedArtifact<A>where
A: ArtifactId,
Resolve a required artifact.
Sourcepub fn try_require<A>(
&self,
handle: ArtifactHandle<A>,
) -> ResolvedOptionalArtifact<A>where
A: ArtifactId,
pub fn try_require<A>(
&self,
handle: ArtifactHandle<A>,
) -> ResolvedOptionalArtifact<A>where
A: ArtifactId,
Resolve an optional artifact.
Auto Trait Implementations§
impl<'a> !Freeze for ArtifactResolver<'a>
impl<'a> !RefUnwindSafe for ArtifactResolver<'a>
impl<'a> Send for ArtifactResolver<'a>
impl<'a> !Sync for ArtifactResolver<'a>
impl<'a> Unpin for ArtifactResolver<'a>
impl<'a> !UnwindSafe for ArtifactResolver<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more