Function byond::call::test_byond_call [] [src]

pub fn test_byond_call(
    func: unsafe extern "C" fn(_: i32, _: *const *const i8) -> *const i8
) -> String

Allows one to easily test BYOND callbacks. Does not take arguments to pass down.

Warning: This passes a straight nullptr to the function's argument list. As such, if the function expects any arguments, this will probably segfault. Non-UTF-8 returned strings are lossily converted.

Panics

Panics if the strings in args contain a NUL byte.