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.
pub fn with_span_field<S>(self, field: S) -> AssertionBuilder<NoCriteria> where
S: Into<String>,
pub fn with_span_field<S>(self, field: S) -> AssertionBuilder<NoCriteria> where
S: Into<String>,
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.
Auto Trait Implementations
impl<S> RefUnwindSafe for AssertionBuilder<S>
impl<S> Send for AssertionBuilder<S>
impl<S> Sync for AssertionBuilder<S>
impl<S> Unpin for AssertionBuilder<S>
impl<S> UnwindSafe for AssertionBuilder<S>
Blanket Implementations
Mutably borrows from an owned value. Read more
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