-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Labels
customer-requestDocuments customer requests.Documents customer requests.
Description
core::ffi::CStr doesn't implement TryFromBytes or IntoBytes, but it meets the requirements for both.
Currently core::ffi::CStr is a wrapper around [u8], but theoretically it'll change so &CStr is a thin pointer.
Before this lands, we should seriously consider:
- Is
<CStr as TryFromBytes>::try_ref_from_bytesand<CStr as IntoBytes>::as_byteseventually having dynamic performance unacceptable? - Is it risky to use
mem::size_of_valfor aCStr?mem::size_of_val(&cstr)currently works today, so it'd be very surprising if that breaks forCStreven when extern types land. Would upstream really break its current behavior on stable? - zerocopy would always include the
nulbyte inas_bytes- could that be confusing?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
customer-requestDocuments customer requests.Documents customer requests.