This commit is contained in:
Heath Stewart 2024-10-15 14:14:05 -07:00 коммит произвёл GitHub
Родитель 3606f2d6a0
Коммит 2f7756758c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -649,7 +649,7 @@ Builders are an idiomatic pattern in Rust, such as the [typestate builder patter
{% include requirement/MUST id="rust-enums-names" %} implement all enumeration variations as PascalCase.
{% include requirement/MUST id="rust-enums-derive" %} derive or implement `Clone` and `Debug` for all enums.
{% include requirement/MUST id="rust-enums-derive" %} derive or implement `Clone`, `Debug`, `Eq`, and `PartialEq` for all enums.
{% include requirement/MUST id="rust-enums-derive-copy" %} derive `Copy` for all fixed enums.
@ -679,7 +679,7 @@ See [RFC 2008][rust-lang-rfc-2008] for more information.
{% include requirement/MUST id="rust-enum-fixed" %} implement all fixed enumerations using only defined variants:
```rust
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[non_exhaustive]
pub enum FixedEnum {
#[serde(rename = "foo")]
@ -692,7 +692,7 @@ pub enum FixedEnum {
{% include requirement/MUST id="rust-enum-extensible" %} implement all extensible enumerations - those which may take a variant that is not defined - using defined variants and an untagged `UnknownValue`:
```rust
#[derive(Clone, Debug, Deserialize, Serialize)]
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
#[non_exhaustive]
pub enum ExtensibleEnum {
#[serde(rename = "foo")]