decrement the value in a cmap key (must be a numeric type)
(handle: &Handle, key_name: &str)
| 674 | |
| 675 | /// decrement the value in a cmap key (must be a numeric type) |
| 676 | pub fn dec(handle: &Handle, key_name: &str) -> Result<()> { |
| 677 | let csname = string_to_cstring_validated(key_name, CMAP_KEYNAME_MAXLENGTH)?; |
| 678 | let res = unsafe { ffi::cmap_dec(handle.cmap_handle, csname.as_ptr()) }; |
| 679 | if res == ffi::CS_OK { |
| 680 | Ok(()) |
| 681 | } else { |
| 682 | Err(CsError::from_c(res)) |
| 683 | } |
| 684 | } |
| 685 | |
| 686 | // Callback for CMAP notify events from corosync, convert params to Rust and pass on. |
| 687 | extern "C" fn rust_notify_fn( |
nothing calls this directly
no test coverage detected