smithy-rs icon indicating copy to clipboard operation
smithy-rs copied to clipboard

`Shape` trait to expose Smithy model information in Rust types

Open david-perez opened this issue 8 months ago • 0 comments

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.

david-perez avatar Jun 12 '24 14:06 david-perez