(
name: *const c_char,
model: *const c_char,
cluster_key: *const c_char,
)
| 508 | /// `name`, `model`, and `cluster_key` must be valid, non-null, NUL-terminated C strings. |
| 509 | #[no_mangle] |
| 510 | pub 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] |
| 523 | pub extern "C" fn cake_stop_worker() { |
no test coverage detected