Cargo Features

[dependencies]
snapbox = { version = "0.6.16", default-features = false, features = ["detect-encoding", "dir", "path", "cmd", "examples", "regex", "json", "term-svg", "structured-data", "debug", "diff", "color", "color-auto", "document-features"] }
default = color-auto, diff

These default features are set whenever snapbox is added without default-features = false somewhere in the dependency tree.

detect-encoding dir?

Feature Flags

Smarter binary file detection

Enables content_inspector

dir path? = detect-encoding

Snapshotting of directories

Enables dunce, filetime, tempfile, and walkdir

Affects ops::Walk, ops::copy_template, snapbox::assert_subset_eq, snapbox::assert_subset_matches

path = dir

Deprecated since 0.5.11, replaced with dir

cmd

Snapshotting of commands

Enables libc, os_pipe, wait-timeout, and windows-sys

Affects cmd::display_exit_status

examples

Building of examples for snapshotting

Enables escargot

regex

Regex text substitutions

Enables regex

json = structured-data

Snapshotting of json

Enables serde and serde_json

Affects data::IntoJson, data::IntoData.is_json, data::IntoData.json, data::IntoData.is_jsonlines, data::IntoData.json_lines, data::IntoData.against_json, data::IntoData.against_jsonlines

term-svg = structured-data

Snapshotting of term styling

Enables anstyle-svg

Affects data::IntoData.is_termsvg, data::IntoData.term_svg

structured-data json? term-svg?

Snapshotting of structured data

Enables serde_json

debug

Extra debugging information

Enables backtrace, debug of snapbox-macros

diff default

Default Feature Flags

Fancy diffs on failure

Enables similar

color color-auto

Colored output support

Enables anstream, color of snapbox-macros

color-auto default = color

Auto-detect whether to use colors

Features from optional dependencies

document-features implicit feature

Enables document-features

document-features:

Extract documentation for the feature flags from comments in Cargo.toml