iai_callgrind

Macro cstring

source
macro_rules! cstring {
    ($string:literal) => { ... };
}
Available on crate feature client_requests_defs only.
Expand description

Convenience macro to create a \0-byte terminated std::ffi::CString from a literal string

The string literal passed to this macro must not contain or end with a \0-byte. If you need a checked version of std::ffi::CString you can use std::ffi::CString::new.

ยงSafety

This macro is unsafe but convenient and efficient. It is your responsibility to ensure that the input string literal does not contain any \0 bytes.