The derive macro for Vertex generates an inherent associated function called new(). I propose that it be removed, for the following reasons:
It is undocumented.
It is surprising; derive macros named after traits usually generate only trait implementations.
It is public and cannot be hidden; it's not possible to ask luminance-derive to provide unsafe impl Vertex without also getting the pub fn new.
A Vertex-implementing struct will always have the luminance vertex semantics wrappers on its field types, but an application may wish to have a new() function which accepts application-specific types (e.g. for a color value) or structures whose contents correspond to several vertex attributes, rather than precisely luminance's generated single-purpose types.
(This isn't blocking anything; I just stubbed my toe on it when writing a new vertex type and thought it was worth mentioning.)
The derive macro for
Vertex
generates an inherent associated function callednew()
. I propose that it be removed, for the following reasons:unsafe impl Vertex
without also getting thepub fn new
.Vertex
-implementing struct will always have the luminance vertex semantics wrappers on its field types, but an application may wish to have anew()
function which accepts application-specific types (e.g. for a color value) or structures whose contents correspond to several vertex attributes, rather than precisely luminance's generated single-purpose types.(This isn't blocking anything; I just stubbed my toe on it when writing a new vertex type and thought it was worth mentioning.)