pub struct StaticFileResolver<'a> {
pub root: &'a Path,
pub index: &'a str,
}Expand description
The rules that decide which file a request is answered with.
The resolver holds no server state, so the same rules can be used by any server that serves the files of a directory.
Fields§
§root: &'a PathThe directory the files are served from.
index: &'a strThe file that answers a request for a directory.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for StaticFileResolver<'a>
impl<'a> Clone for StaticFileResolver<'a>
impl<'a> Copy for StaticFileResolver<'a>
Source§impl<'a> Debug for StaticFileResolver<'a>
impl<'a> Debug for StaticFileResolver<'a>
Auto Trait Implementations§
impl<'a> Freeze for StaticFileResolver<'a>
impl<'a> RefUnwindSafe for StaticFileResolver<'a>
impl<'a> Send for StaticFileResolver<'a>
impl<'a> Sync for StaticFileResolver<'a>
impl<'a> Unpin for StaticFileResolver<'a>
impl<'a> UnsafeUnpin for StaticFileResolver<'a>
impl<'a> UnwindSafe for StaticFileResolver<'a>
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