The Messenger of Allah (May peace be upon him) used to wash his head with marsh-mallow while he was sexually defiled. It was sufficient for him and he did not pour water upon it.
عَنِ النَّبِيِّ ﷺ أَنَّهُ كَانَ يَغْسِلُ رَأْسَهُ بِالْخِطْمِيِّ وَهُوَ جُنُبٌ يَجْتَزِئُ بِذَلِكَ وَلاَ يَصُبُّ عَلَيْهِ الْمَاءَ