pgwire::pg_protocol

Function cstr_to_str

source
pub fn cstr_to_str(b: &Bytes) -> Result<&str, Utf8Error>
Expand description

Truncate 0 from C string in Bytes and stringify it (returns slice, no allocations).

PG protocol strings are always C strings.