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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResolveHandler
impl !RefUnwindSafe for ResolveHandler
impl Send for ResolveHandler
impl Sync for ResolveHandler
impl Unpin for ResolveHandler
impl !UnwindSafe for ResolveHandler
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