In the server we have this handy OperationShape trait that we implement on operation shapes. Among other things, it has a const ID that allows one to retrieve the shape id corresponding to the shape from which the Rust type was generated.
It would be nice if we could expose shape IDs for all Rust types derived from Smithy shapes via an e.g. Shape trait.
This way middleware authors and end-users can code against this trait and reach into this information, which can be useful in, for example, the context of metrics and error reporting.
In the server we have this handy
OperationShape
trait that we implement on operation shapes. Among other things, it has aconst ID
that allows one to retrieve the shape id corresponding to the shape from which the Rust type was generated.It would be nice if we could expose shape IDs for all Rust types derived from Smithy shapes via an e.g.
Shape
trait.This way middleware authors and end-users can code against this trait and reach into this information, which can be useful in, for example, the context of metrics and error reporting.