pub fn assert_max_number_of_controllers(
current_controllers: &Controllers,
controllers_ids: &[ControllerId],
scope: &ControllerScope,
max_controllers: Option<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.scope: The scope of the new controllers to be added.max_controllers: Optional custom maximum number of allowed controllers.
§Returns
Ok(()) if the operation is successful, or Err(String) if the maximum is exceeded.