Self chilling beer cans that worked by venting pressurised CO2 rapidly from a receptacle inside the can itself were actually a thing but never took off, probably due to cost and health and safety concerns about beer cans containing pressurised gas.
We are getting a bit off topic here though.