Skip to main content

config_from_raw

Function config_from_raw 

Source
pub unsafe fn config_from_raw(ptr: *const u8, len: usize) -> &'static str
Expand description

Helper to extract a &str config from raw FFI pointers.

Returns an empty string if the pointer is null or the length is zero. Panics if the bytes are not valid UTF-8.

ยงSafety

If ptr is non-null, it must be valid for reads of len bytes.