Cargo Features

[dependencies]
custom_error = { version = "1.9.2", default-features = false, features = ["std", "unstable"] }
default = std

The std feature is set by default whenever custom_error is added without default-features = false somewhere in the dependency tree.

std default

Disable std for use in no_std context.

unstable

Enable allocator_api and try_reserve, to define Error trait for unstable AllocError and TryReserveError in no-std