Fungus is one of the main decay elements that nature uses to dispose of dead materials so it would be a great beneficial part of a hugel bed.
The only time to not use such wood is if it is infected with a known disease, such as fire blight, those need to be incinerated to destroy the disease, the left behind ash and or charcoal would be good to use.
Kind of a funny story, only sort of relevant. Near my old family home in Robstown Texas, there was a BBQ trailer on the corner. I don't remember the name but it was definitely owned by a Czechoslovakian. He had piles of mesquite logs behind his trailer, and there was one log of mesquite that for whatever reason decided to put down roots, and a new tree was growing right out of the middle of it. The barbecue guy was terribly proud of it. He put a big wooden sign in the ground next to it, with an arrow pointing down, calling it The Jesus Log.
Indeed, Mesquite, willow, cottonwood, black and honeylocust are all trees capable of rooting and sprouting from a bark intact hunk of log.
These trees have enzymes and hormones in their cambium layer that allow a cut piece to form root nodes and buds after it has been removed from the parent root system.
Because of those traits, they can and will produce a new tree when ever possible.
Their inner bark also can be used to create rooting water just by soaking pieces of the cambium layer in water for a few days.