nginxinc / ngx-rust

Rust binding for NGINX
Apache License 2.0
752 stars 62 forks source link

Byte-oriented methods for `ngx_str_t` #91

Closed bavshin-f5 closed 3 weeks ago

bavshin-f5 commented 2 months ago

ngx_str_t likely does not contain UTF-8, so converting it from/to UTF-8 strings is expensive and useless. from_bytes() and as_bytes() should be a more appropriate interface.

At some point in the future I intend to drop the String/&str conversion methods, as these aren't safe.