pub struct NgxStr(/* private fields */);
Representation of a borrowed Nginx string.
Create an NgxStr from an ngx_str_t.
NgxStr
ngx_str_t
The caller has provided a valid ngx_str_t with a data pointer that points to range of bytes of at least len bytes, whose content remains valid and doesn’t change for the lifetime of the returned NgxStr.
data
len
Access the NgxStr as a byte slice.
Yields a &str slice if the NgxStr contains valid UTF-8.
&str
Converts an NgxStr into a Cow<str>, replacing invalid UTF-8 sequences.
Cow<str>
See String::from_utf8_lossy.
String::from_utf8_lossy
Returns true if the NgxStr is empty, otherwise false.
true
false
TypeId
self