#[cfg(feature = "verify-actix")]
pub mod actix;
mod mapping;
mod stub_finder;
#[async_trait::async_trait(? Send)]
pub trait StubrVerify<T>
where
Self: Sized,
{
async fn verify(self) {
self.verify_except(|_| false).await
}
async fn verify_except<N>(self, except: impl VerifyExcept<N> + 'async_trait);
}
pub trait VerifyExcept<T> {
fn call(&self, name: String) -> bool;
}
impl<F> VerifyExcept<String> for F
where
F: Fn(String) -> bool,
{
fn call(&self, name: String) -> bool {
self(name)
}
}
impl<F> VerifyExcept<&str> for F
where
F: Fn(&str) -> bool,
{
fn call(&self, name: String) -> bool {
self(name.as_str())
}
}