。
I knew it was her the moment I saw her.
Literal
I [topic-は] saw-[instant-とたんに] her [quotative-だと] understood.
~たとたんに ('the moment/instant when') marks an immediately following event — built from past tense + とたんに. 彼女だと分かった = 'understood it was her,' with だと (quotative copula + と). The construction emphasizes the instantaneous recognition.