Enum mock_resolver::ResolveHandler
source · pub enum ResolveHandler {
Waiting(Receiver<PendingResolve>),
Blocked(PendingResolve),
}
Variants§
Waiting(Receiver<PendingResolve>)
Blocked(PendingResolve)
Implementations§
source§impl ResolveHandler
impl ResolveHandler
sourcepub async fn wait(&mut self)
pub async fn wait(&mut self)
Waits for the mock package resolver to receive a resolve request for this handler.
sourcepub async fn fail(self, error: ResolveError)
pub async fn fail(self, error: ResolveError)
Wait for the request and fail the resolve with the given status.
sourcepub async fn resolve(self, pkg: &TestPackage)
pub async fn resolve(self, pkg: &TestPackage)
Wait for the request and succeed the resolve by serving the given package.