Struct spectral::AssertionFailure [] [src]

pub struct AssertionFailure<'r, T: 'r> { /* fields omitted */ }

A failed assertion.

This exposes builder methods to construct the final failure message.

Methods

impl<'r, T: DescriptiveSpec<'r>> AssertionFailure<'r, T>
[src]

Construct a new AssertionFailure from a DescriptiveSpec.

Builder method to add the expected value for the panic message.

Builder method to add the actual value for the panic message.

Builds the failure message with a description (if present), the expected value, and the actual value and then calls panic with the created message.

Trait Implementations

impl<'r, T: Debug + 'r> Debug for AssertionFailure<'r, T>
[src]

Formats the value using the given formatter.