header
The two-line source header that carries a copyright notice and an SPDX license identifier.
The text has no comment marker, so prefix each line for the language of the file
(// , # , …). The REUSE specification and most license
scanners read exactly these two lines. Nothing is validated: years can be "2025" or
"2020-2025", and expression any SPDX expression (see
Expression).
Import
Section titled “Import”Cargo feature license (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
holder | &str | The copyright holder, such as a name or an organization. |
years | &str | The year or range of years of the notice. |
expression | &str | The SPDX license identifier or expression. |
Returns
Section titled “Returns”String — The two lines, without a trailing newline.
