Going from a waking state into the dream state while being conscious
If one is truly mindful during the process of death, then one of two possibilities exist; either one will pass away into complete liberation as an enlightened being or, if there is still some substratum of clinging, one will be reborn as a deva or brahma and be fully conscious of one's previous life.