Exactly this is what happend with my Honda CD 100 yesterday. I was going at 50 km/hr and bike started to stall even when I tried gaining speed at full throttle. It finally came to a stop and would not start despite my several attempts. Luckily, a workshop was nearby. I took it there; after a thorough check up it was found that rectifier unit was not producing any current. The technician unplugged rectifier's wires, plugged them in to his own rectifier and bike came back to life. He plugged the connectors back in to the bike's rectifier and it started giving current too.
Possible explanation: bike was parked in open at office and it had been raining yesterday, perhaps some wires short-circuited when, somehow, a drop of water managed to reach there and socked them.