Trait binaryen::ToCStr
[−]
[src]
pub trait ToCStr { type Storage; fn to_cstr_stash(self) -> Stash<Self::Storage>; }
This trait provides a means for converting various types of strings into a pointer that can be passed into C code.
If you have a CString/&CStr you can use it to pass a C string pointer directly, without conversion. Otherwise, you can sacrifice your String to convert it into CString.
Associated Types
type Storage
Required Methods
fn to_cstr_stash(self) -> Stash<Self::Storage>
Make conversion to a C string (if needed) and then return
a Stash
— a pointer to the C string alongside with
a storage which "owns" the data it points to.