Crate salvo_serve_static

Crate salvo_serve_static 

Source
Expand description

Serve static files and directories for Salvo web framework.

This crate provides handlers for serving static content:

  • StaticDir - Serve files from directory with options for directory listing
  • StaticFile - Serve a single file
  • StaticEmbed - Serve embedded files using rust-embed (when “embed” feature is enabled)

Read more: https://salvo.rs

Re-exports§

pub use dir::StaticDir;

Modules§

dir
Serve static directories with directory listing support

Structs§

StaticEmbedembed
Handler that serves embedded files using rust-embed.
StaticFile
StaticFile is a handler that serves a single static file.

Traits§

EmbeddedFileExtembed
Extension trait for EmbeddedFile.

Functions§

render_embedded_fileembed
Render an EmbeddedFile to the Response.
static_embedembed
Create a new StaticEmbed handler for the given embedded asset type.