about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorEric Seppanen <eds@reric.net>2022-03-15 16:47:26 -0700
committerEric Seppanen <eds@reric.net>2022-03-18 15:46:49 -0700
commitd5fe4cad5a68a305b9fa7d421b0ffa358b14b0a9 (patch)
treecdae84e7294252b09030d812d04cda15ecbc7b96 /library/std/src/sys/unix/stack_overflow.rs
parent1bfe40d11c3630254504fb73eeccfca28d50df52 (diff)
downloadrust-d5fe4cad5a68a305b9fa7d421b0ffa358b14b0a9.tar.gz
rust-d5fe4cad5a68a305b9fa7d421b0ffa358b14b0a9.zip
add CStr::from_bytes_until_nul
This adds a member fn that converts a slice into a CStr; it is intended
to be safer than from_ptr (which is unsafe and may read out of bounds),
and more useful than from_bytes_with_nul (which requires that the caller
already know where the nul byte is).

feature gate: cstr_from_bytes_until_nul

Also add an error type FromBytesUntilNulError for this fn.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions