Struct spectral::AssertionFailure [] [src]

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

A failed assertion.

This exposes builder methods to construct the final failure message.

Methods

impl<'r> AssertionFailure<'r>
[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> Debug for AssertionFailure<'r>
[src]

Formats the value using the given formatter.