Structural biology of bacterial functional amyloid formation