pub fn remove_traffic_shaping_generator(
    calculate_strategy: CalculateStrategy,
    control_strategy: ControlStrategy,
) -> Result<()> {
    match (calculate_strategy, control_strategy) {
        (CalculateStrategy::Custom(_), _) | (_, ControlStrategy::Custom(_)) => {
            GEN_FUN_MAP
                .write()
                .unwrap()
                .remove(&ControllerGenKey::new(calculate_strategy, control_strategy));
            Ok(())
        }
        _ => Err(Error::msg(
            "Default control behaviors are not allowed to be removed.",
        )),
    }
}
// This func acquires the lock on global `GEN_FUN_MAP`,
// please release your lock on it before calling this func
This func acquires the lock on global `GEN_FUN_MAP`,
please release your lock on it before calling this func
This func acquires the lock on global ` GEN_FUN_MAP ` please release your lock on it before calling this func
pub fn remove_traffic_shaping_generator(
    calculate_strategy: CalculateStrategy,
    control_strategy: ControlStrategy,
) -> Result<()> {
    match (calculate_strategy, control_strategy) {
        (CalculateStrategy::Custom(_), _) | (_, ControlStrategy::Custom(_)) => {
            GEN_FUN_MAP
                .write()
                .unwrap()
                .remove(&ControllerGenKey::new(calculate_strategy, control_strategy));
            Ok(())
        }
        _ => Err(Error::msg(
            "Default control behaviors are not allowed to be removed.",
        )),
    }
}
pub fn remove_traffic_shaping_generator ( calculate_strategy : CalculateStrategy , control_strategy : ControlStrategy , ) -> Result < ( ) > { match ( calculate_strategy , control_strategy ) { ( CalculateStrategy :: Custom ( _ ) , _ ) | ( _ , ControlStrategy :: Custom ( _ ) ) => { GEN_FUN_MAP . write ( ) . unwrap ( ) . remove ( & ControllerGenKey :: new ( calculate_strategy , control_strategy ) ) ; Ok ( ( ) ) } _ => Err ( Error :: msg ( " " , ) ) , } }
This func acquires the lock on global `GEN_FUN_MAP`,
please release your lock on it before calling this func
This func acquires the lock on global ` GEN_FUN_MAP ` please release your lock on it before calling this func
calculate_strategy
CalculateStrategy
control_strategy
ControlStrategy
calculate_strategy
CalculateStrategy
control_strategy
ControlStrategy