Struct tracing_fluent_assertions::assertion::AssertionBuilder[][src]

pub struct AssertionBuilder<S> { /* fields omitted */ }
Expand description

Configures and constructs an Assertion.

This builder uses a state pattern to ensure that the necessary fields are configured before a valid Assertion can be constructed. You may notice that some methods are only available once other methods have been called.

You must first define a span matcher, which defines how this assertion is matched to a given span, and then you must specify the assertion criteria itself, which defines the behavior of the span to assert for.

Once these are defined, an Assertion can be constructed by calling [finalize].

Implementations

Sets the name of the span to match.

All span matchers, which includes [with_name], [with_target], and [with_span_field], are additive, which means a span must match all of them to match the assertion overall.

Sets the target of the span to match.

All span matchers, which includes [with_name], [with_target], and [with_span_field], are additive, which means a span must match all of them to match the assertion overall.

Sets the name of the span to match.

All span matchers, which includes [with_name], [with_target], and [with_span_field], are additive, which means a span must match all of them to match the assertion overall.

Sets the target of the span to match.

All span matchers, which includes [with_name], [with_target], and [with_span_field], are additive, which means a span must match all of them to match the assertion overall.

Adds a field which the span must contain to match.

The field is matched by name.

All span matchers, which includes [with_name], [with_target], and [with_span_field], are additive, which means a span must match all of them to match the assertion overall.

Asserts that a matching span was created at least once.

Asserts that a matching span was entered at least once.

Asserts that a matching span was exited at least once.

Asserts that a matching span was closed at least once.

Asserts that a matching span was created at least n times.

Asserts that a matching span was entered at least n times.

Asserts that a matching span was exited at least n times.

Asserts that a matching span was closed at least n times.

Asserts that a matching span was created at least once.

Asserts that a matching span was entered at least once.

Asserts that a matching span was exited at least once.

Asserts that a matching span was closed at least once.

Asserts that a matching span was created at least n times.

Asserts that a matching span was entered at least n times.

Asserts that a matching span was exited at least n times.

Asserts that a matching span was closed at least n times.

Creates the finalized Assertion.

Once finalized, the assertion is live and its state will be updated going forward.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more