DKerp / get-size

Determine the size in bytes an object occupies inside RAM.
MIT License
22 stars 12 forks source link

Generics support for derive, specify accounting rules. #2

Closed DKerp closed 1 year ago

DKerp commented 1 year ago

Implements support for deriving GetSize on structs and enums with generics. Resolves #1. The derive macro does now also support lifetimes.

Furthermore a struct level ignore attribute used by the derive macro has been added, which allows specifying the generic types which can be ignored while deriving GetSize. All other types will be required to also implement GetSize.

Additionally I have specified the accounting rules which this crate follows, and updated the implementation for the std library artifacts accordingly.