Skip to main content

diplomat_is_str

Function diplomat_is_str 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn diplomat_is_str( ptr: *const u8, size: usize, ) -> bool
Expand description

Whether a &[u8] is a &str.

Primarily to be called by generated FFI bindings, not Rust code, but is available if needed.

ยงSafety

  • ptr and size must be a valid &[u8]