pub struct Data { /* private fields */ }
Expand description

Test fixture, actual output, or expected result

This provides conveniences for tracking the intended format (binary vs text).

Implementations

Mark the data as binary (no post-processing)

Mark the data as text (post-processing)

Empty test data

Load test data from a file

Overwrite a snapshot

Update an inline snapshot

Post-process text

See utils

Convert from binary to text, if possible

This will do extra binary file detection if detect-encoding feature flag is set

Coerce to a string

Note: this will not do a binary-content check

Coerce to a string

Note: this will not do a binary-content check

Return the underlying str

Note: this will not inspect binary data for being a valid str.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

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.