proxy-wasm-rust-sdk icon indicating copy to clipboard operation
proxy-wasm-rust-sdk copied to clipboard

Use a generic trait bound for serialize_property_path

Open datibbaw opened this issue 2 months ago • 0 comments

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
}

datibbaw avatar Oct 02 '25 06:10 datibbaw