If you were high level magic and the materials or had a lot of money to buy one, you could be able to drop a teleportal thingy that you could go through, maybe a limited amount of times. Then, if you were adventuring and needed to rest, you could teleport back outside the dungeon and stop at an inn, then teleport back.