Some are avatars of the Supreme Lord (purusa), and some are avatars of His energy (prakrti). The prakrti and purusa are simultaneously one and different. Forms are different taking on the roopa of the Shakti. Rama is Supreme God and Hanuman is His eternal devotee (Shakti). But many times the eternal associates of the Lord comprise in themselves the incarnations of multiple personalities. So Hanuman in himself is the Rudra principle.Thus we also call Hanuman as Rudratmaka (having the mentality of Rudra), because he has the destructive power and fire of Rudra.