The psychological reading
These dreams are frightening, yet they often come during big transitions: a breakup, a move, a new job. Look at who the attacker was. A stranger tends to stand for pressure or change you cannot name.
A familiar person points to tension with them or to a quality of theirs that overwhelms you. Feeling relief at the end suggests you are ready to let the old chapter go.