I want to know how actix-web can use the template engine

I want to know how actix-web can use the template engine, or let my web package the pages together and provide access, for example, the api interface can be used while using Thymeleaf in springboot of java