pub fn assert_max_number_of_controllers(
current_controllers: &Controllers,
controllers_ids: &[ControllerId],
max_controllers: usize,
) -> Result<(), String>Expand description
Asserts that the number of controllers does not exceed the maximum allowed.
§Arguments
current_controllers: Reference to the current set of controllers.controllers_ids: Slice ofControllerIdrepresenting the controllers to be added.max_controllers: Maximum number of allowed controllers.
§Returns
Ok(()) if the operation is successful, or Err(String) if the maximum is exceeded.