MCPcopy Create free account
hub / github.com/evilsocket/cake / cake_start_worker

Function cake_start_worker

cake-mobile/src/lib.rs:510–520  ·  view source on GitHub ↗
(
    name: *const c_char,
    model: *const c_char,
    cluster_key: *const c_char,
)

Source from the content-addressed store, hash-verified

508/// `name`, `model`, and `cluster_key` must be valid, non-null, NUL-terminated C strings.
509#[no_mangle]
510pub unsafe extern "C" fn cake_start_worker(
511 name: *const c_char,
512 model: *const c_char,
513 cluster_key: *const c_char,
514) -> *mut c_char {
515 let name = CStr::from_ptr(name).to_string_lossy().into_owned();
516 let model = CStr::from_ptr(model).to_string_lossy().into_owned();
517 let key = CStr::from_ptr(cluster_key).to_string_lossy().into_owned();
518 let result = start_worker(name, model, key);
519 CString::new(result).unwrap_or_default().into_raw()
520}
521
522#[no_mangle]
523pub extern "C" fn cake_stop_worker() {

Callers 1

startWorkerMethod · 0.85

Calls 1

start_workerFunction · 0.85

Tested by

no test coverage detected