Barbara is working on rust-gpu. In that project, she has a struct Image that represents GPU images. There are a number of constant parameters allowing this type to be heavily customized in a number of ways. In some cases, helper methods are only available for images with particular formats. She writes the struct declaration:
Barbara gets a few compile errors about her types used as a const param not implementing StructuralEq so she derives that and moves on.
She then wants to write some methods that only work for images in some specific formats: