Both rodents can be very dangerous. Having said that, I know of a case where there was a Mozambique Spitting Cobra kept as a display type animal by a biology teacher. One day some kids from the class caught a wild rat from the school grounds, and they(with permission from the teacher) gave it to the snake.

It didn't eat the rat right away, so they left for break, but when they got back the rat was busy tearing the cobra to pieces, literally. The cobra died, it didn't even get a bite in. I know this is probably on the extreme end of the scale, but rats are very dangerous. Mice will also take chunks out of a snake if they get the chance, hence why you should always observe the feeding and be ready to step in if the rodent gets it's teeth anywhere near your snake!