Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Are HashSets not supported? #513

@MendyBerger

Description

@MendyBerger

Tried to derive Encode and Decode on a struct with a HashSet property but getting the following error:

error[E0277]: the trait bound `HashSet<u32>: Encode` is not satisfied
 --> src/main.rs:6:10
  |
6 | #[derive(Encode, Decode)]
  |          ^^^^^^ the trait `Encode` is not implemented for `HashSet<u32>`
  |
  = note: this error originates in the derive macro `Encode` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `HashSet<u32>: Decode` is not satisfied
 --> src/main.rs:6:18
  |
6 | #[derive(Encode, Decode)]
  |                  ^^^^^^ the trait `Decode` is not implemented for `HashSet<u32>`
  |
  = note: this error originates in the derive macro `Decode` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions