The reactions involved during rusting of iron are
Fe(s)⟶Fe2+(aq)+2e−(at anode )
O2(g)+4H+(aq)+4e−⟶2H2O(l) (at cathode)
4Fe2+(aq)+O2(g)+4H2O(l)⟶2Fe2O3(s)+8H+
Fe2O3(s)+xH2O(l)⟶Fe2O3⋅xH2O
All the reactions are involved.