pub struct ServeDirLayer;Expand description
§Serve Directory Layer
This struct represents the Serve Directory Layer which serves static files and directories.
The layer is a wrapper around tower_http::services::ServeDir.
Serves static content with optional compression and custom chunk sizing.
Implementations§
Source§impl ServeDirLayer
impl ServeDirLayer
pub fn new(config: &ServeDirConfig) -> ServeDir<ServeFile>
Auto Trait Implementations§
impl Freeze for ServeDirLayer
impl RefUnwindSafe for ServeDirLayer
impl Send for ServeDirLayer
impl Sync for ServeDirLayer
impl Unpin for ServeDirLayer
impl UnsafeUnpin for ServeDirLayer
impl UnwindSafe for ServeDirLayer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more