strawberry_fields

Crates.iostrawberry_fields
lib.rsstrawberry_fields
version0.1.0
sourcesrc
created_at2024-06-09 10:59:04.199676
updated_at2024-06-09 10:59:04.199676
descriptionConsume, read, and mutate struct fields with an iterator-like api.
homepage
repositoryhttps://github.com/Jeremiah-Griffin/strawberry_fields
max_upload_size
id1266309
size11,076
Jeremiah Griffin (Jeremiah-Griffin)

documentation

README

Strawberry Fields allows for the "iteration" of struct fields without allocation or manipulating the memory layout of the type.

This crate's api mirrors the Iterator trait from the standard library, with the primary distinction being that there are seperate methods for owned, shared and unique reference types.

FAQ

Q: Why not collect all fields in an array?

A: For very simple structs this may work, but for types which may contain a mix of concrete types and generics, developers would be required to introduce dynamic dispatch or enumeration: this incurs a runtime penalty.

Commit count: 6

cargo fmt