Function cstring_interop::with_cstring [−][src]
pub fn with_cstring<T, E: From<Error>>(
s: String,
f: impl FnOnce(CString<'_>) -> Result<T, E>
) -> Result<T, E>
Calls the given function with a lifetime-bound CString
constructed from
the given String
.