diagnostics_assertions

Trait PropertyAssertion

Source
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§