# display-types
[](https://github.com/DracoWhitefire/display-types/actions/workflows/ci.yml)
[](https://crates.io/crates/display-types)
[](https://docs.rs/display-types)
[](LICENSE)
[](https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html)
[](https://slsa.dev)
[](#verifying-releases)
Shared display capability types for display connection negotiation.
This crate provides [`DisplayCapabilities`] and all its supporting types —
the stable, typed model that EDID/DisplayID parsers produce and negotiation
engines consume. It is the shared vocabulary between
[piaf](https://crates.io/crates/piaf) (the parser) and
[concordance](https://crates.io/crates/concordance) (the negotiation engine),
and is suitable for any crate that needs to describe display capabilities without
taking a dependency on a full parser.
## Feature flags
| `std` | yes | Enables `std`-dependent types; implies `alloc`. |
| `alloc` | no | Enables heap-allocated types (`Vec`, `Arc`, `String`) without full `std`. |
| `serde` | no | Derives `Serialize`/`Deserialize` for all public types. |
With neither `std` nor `alloc` the crate compiles in bare `no_std` mode and
exposes only the scalar types (enums and copy structs).
## Usage
```sh
cargo add display-types
```
For `no_std` with heap allocation (e.g. embedded with an allocator):
```sh
cargo add display-types --no-default-features --features alloc
```
For bare `no_std` (scalars only):
```sh
cargo add display-types --no-default-features
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines and [doc/setup.md](doc/setup.md)
for build and test instructions.
## Verifying releases
Releases are built on GitHub Actions and attested with
[SLSA Build Level 2](https://slsa.dev) provenance (from 0.4.0). To verify a release
`.crate` against its signed provenance, install the
[GitHub CLI](https://cli.github.com/) and run:
```sh
gh attestation verify display-types-X.Y.Z.crate --repo DracoWhitefire/display-types
```
The attested `.crate` is attached to each
[GitHub release](https://github.com/DracoWhitefire/display-types/releases).
Releases from 0.4.1 are uploaded through crates.io
[trusted publishing](https://rust-lang.github.io/rfcs/3691-trusted-publishing-cratesio.html): the publish
workflow obtains a short-lived token via OpenID Connect instead of using a stored
API token. Since 0.4.1 was released, crates.io also rejects uploads made with an
API token for this crate (the badge above reflects that setting). Each version's
publishing details, including the workflow run and commit, are available from the
crates.io API:
```sh
curl -A "your-tool (contact)" https://crates.io/api/v1/crates/display-types/X.Y.Z
# see .version.trustpub_data
```
Versions up to 0.3.1 were uploaded with an API token (mostly from CI) and carry no
provenance; 0.4.0 carries provenance but was also uploaded with an API token.
## License
Licensed under the [Mozilla Public License 2.0](LICENSE).