Struct NormalizeToExpected
pub struct NormalizeToExpected<'a> {
substitutions: Option<&'a Redactions>,
unordered: bool,
}Expand description
Adjust actual based on expected
Fields§
§substitutions: Option<&'a Redactions>§unordered: boolImplementations§
§impl<'a> NormalizeToExpected<'a>
impl<'a> NormalizeToExpected<'a>
pub fn new() -> NormalizeToExpected<'a>
pub fn unordered(self) -> NormalizeToExpected<'a>
pub fn unordered(self) -> NormalizeToExpected<'a>
Make unordered content comparable
This is done by re-ordering actual according to expected.
pub fn redact(self) -> NormalizeToExpected<'a>
pub fn redact(self) -> NormalizeToExpected<'a>
Apply built-in redactions.
Built-in redactions:
...on a line of its own: match multiple complete lines[..]: match multiple characters within a line
Built-ins cannot automatically be applied to actual but are inferred from expected
pub fn redact_with(self, redactions: &'a Redactions) -> NormalizeToExpected<'a>
pub fn redact_with(self, redactions: &'a Redactions) -> NormalizeToExpected<'a>
Apply built-in and user Redactions
Built-in redactions:
...on a line of its own: match multiple complete lines[..]: match multiple characters within a line
Built-ins cannot automatically be applied to actual but are inferred from expected
pub fn normalize(&self, actual: Data, expected: &Data) -> Data
Trait Implementations§
§impl Default for NormalizeToExpected<'_>
impl Default for NormalizeToExpected<'_>
§fn default() -> NormalizeToExpected<'_>
fn default() -> NormalizeToExpected<'_>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for NormalizeToExpected<'a>
impl<'a> RefUnwindSafe for NormalizeToExpected<'a>
impl<'a> Send for NormalizeToExpected<'a>
impl<'a> Sync for NormalizeToExpected<'a>
impl<'a> Unpin for NormalizeToExpected<'a>
impl<'a> UnsafeUnpin for NormalizeToExpected<'a>
impl<'a> UnwindSafe for NormalizeToExpected<'a>
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
Mutably borrows from an owned value. Read more
§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>
Converts
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>
Converts
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes