What is this structure called?

which was to have happened

This is a perfect infinitive meaning ‘should have happened’.

Thank you so much Sir.
Can you please give me some examples of the same structure? I want to learn this type. I don’t know how to use. Please

I ought to have waited but I went home instead.

I must have forgotten what you told me because I can’t remember a word.

I could have finished reading the book if you had given me more time.

You needed to have read the instructions before you started making it.

Thank you so much, Sir
it is easy to understand now. :slight_smile: