I'm currently building approximately a 60' X 100' garden on the edge of a swamp (1-2 feet above the water table), and am wondering what to build the fence out of, and how to build it as this is also my wild mushroom garden, and the mushrooms will attack the poles.
Well, there is a whole university of thought on how to best keep fence posts from rotting. There are also quite a few good answers on this site - try searching "fence post rot". Some of them are linked below:
In general, water is not necessarily bad for wood - it is the combination of water and air that allows microbes to grow and causes rot. On our farm, we usually use bare cedar posts for our wire fence, which hold up pretty well, but we still end up replacing them every 5-7 years. For structural posts, or where we want to hang nice wooden fencing on the posts (sounds like your application), we generally coat the bottom few feet with creosote, which helps somewhat with minimizing water penetration (depending on whether you soak or paint it), but mostly keeps the air from getting in. The most important part is to extend the coating about 6 inches above the soil, to complete the barrier. Personally, I don't know whether the coating could affect the fungi - I would go for actual creosote, as opposed to the CCA compounds, but both can have health risks.