Skip to main content

static_files_router

Function static_files_router 

Source
pub fn static_files_router(_path: impl AsRef<Path>, _prefix: &str) -> Router
Expand description

创建静态文件服务路由

用于提供静态资源文件服务。

§参数

  • path - 静态文件所在的目录路径
  • prefix - 路由前缀,例如 “/static”