pub struct InfoNote {
pub message: String,
pub phase: Option<Cow<'static, str>>,
}Expand description
Informational annotation that does NOT contribute to the failure
verdict — the structural counterpart to AssertDetail for
“context surfaced alongside a result” emissions. Lives in its own
type (not as a DetailKind variant of AssertDetail) so the
“details = failures” mental model holds at the type level:
AssertResult::details is the failure stream, AssertResult::info_notes
is the context stream. Producers can no longer accidentally tag a
note as a failure (the prior DetailKind::Note variant on
AssertDetail made misclassification a one-character bug — every
sidecar consumer that read details needed to remember to filter
kind == Note to count real failures, and forgetting silently
misreported failure counts).
Carries the same phase field as AssertDetail so the auto-repro
renderer can attribute notes to the scenario phase they were emitted
under, mirroring the per-step grouping already used for failures
and passes.
PartialEq + Eq mirror the derive set on AssertDetail and
PassDetail so test authors can compose AssertResult fixtures
across the three record types with uniform structural-equality
affordances. Test authors should still prefer
result.info_notes.iter().any(|n| n.message.contains(...)) over
assert_eq!(result.info_notes, expected) so pins survive note
wording adjustments without churn.
Fields§
§message: String§phase: Option<Cow<'static, str>>Scenario phase the note was emitted under. Mirrors
AssertDetail::phase and PassDetail::phase so the
renderer threads pass / fail / note records through one
per-phase grouping.
Implementations§
Source§impl InfoNote
impl InfoNote
pub fn new(message: impl Into<String>) -> Self
Sourcepub fn with_phase(self, phase: impl Into<Cow<'static, str>>) -> Self
pub fn with_phase(self, phase: impl Into<Cow<'static, str>>) -> Self
Builder-style setter for Self::phase. Matches the
AssertDetail::with_phase shape so producers can chain
InfoNote::new(...).with_phase(...) uniformly with the
failure-detail builder.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for InfoNote
impl<'de> Deserialize<'de> for InfoNote
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for InfoNote
impl StructuralPartialEq for InfoNote
Auto Trait Implementations§
impl Freeze for InfoNote
impl RefUnwindSafe for InfoNote
impl Send for InfoNote
impl Sync for InfoNote
impl Unpin for InfoNote
impl UnwindSafe for InfoNote
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more