pub trait PropertyAssertion<K = String> {
    // Required method
    fn run(&self, actual: &Property<K>) -> Result<(), Error>;
}
Expand description

Trait implemented by types that can act as properies for assertion.

Required Methods§

source

fn run(&self, actual: &Property<K>) -> Result<(), Error>

Check whether |actual| property satisfies criteria. Return Ok if assertion passes and Error if assertion fails.

Implementations on Foreign Types§

source§

impl<K> PropertyAssertion<K> for &str

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for &Regex

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for bool

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for f64

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for i64

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for u64

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for ExponentialHistogram<f64>

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for ExponentialHistogram<i64>

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for ExponentialHistogram<u64>

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for LinearHistogram<f64>

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for LinearHistogram<i64>

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for LinearHistogram<u64>

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for String

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for Vec<&str>

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for Vec<f64>

Asserts plain numeric arrays

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for Vec<i64>

Asserts plain numeric arrays

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for Vec<u8>

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for Vec<u64>

Asserts plain numeric arrays

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for Vec<String>

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

source§

impl<K> PropertyAssertion<K> for Regex

A PropertyAssertion that passes for any String containing a matching for the given regular expression.

source§

fn run(&self, actual: &Property<K>) -> Result<(), Error>

Implementors§