proxy-wasm-rust-sdk
proxy-wasm-rust-sdk copied to clipboard
Use a generic trait bound for serialize_property_path
This change refactors the serialize_property_path function to be agnostic over any type that can provide a list of string slices, which allows for e.g. constant values to be passed without having to allocate a Vec wrapper.
const ISTIO_PEER_PRINCIPAL: &[&str] = &["filter_state", "io.istio.peer_principal"];
if let Some(value) = context.get_property(ISTIO_PEER_PRINCIPAL) {
// do something awesome
}