Skip to content

Commit

Permalink
Use Op::NAME
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Barber committed Nov 25, 2022
1 parent c68ce6e commit 5d929c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rust-runtime/aws-smithy-http-server/src/plugin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
//! ```
//! # use aws_smithy_http_server::plugin::*;
//! # let layer = ();
//! # struct GetPokemonSpecies;
//! # impl GetPokemonSpecies { const NAME: &'str = ""; };
//! // Create a `Plugin` from a HTTP `Layer`
//! let plugin = HttpLayer(layer);
//!
//! // Only apply the layer to operations with name "GetPokemonSpecies"
//! let plugin = filter_by_operation_name(plugin, |name| name == "GetPokemonSpecies");
//! let plugin = filter_by_operation_name(plugin, |name| name == GetPokemonSpecies::NAME);
//! ```
//!
//! # Construct a [`Plugin`] from a closure that takes as input the operation name
Expand Down

0 comments on commit 5d929c1

Please sign in to comment.