pub enum IndexStrategy {
AlwaysShowListing {
renderer: Arc<ListingRenderer>,
},
ShowListingWhenAbsent {
renderer: Arc<ListingRenderer>,
filenames: HashSet<String>,
},
IndexFiles {
filenames: HashSet<String>,
},
NoIndex,
}
Expand description
Tells the FilesService
how to handle a user request for a directory path.
Variants
AlwaysShowListing
Fields
renderer: Arc<ListingRenderer>
Renders a directory listing when a direct path is requested.
ShowListingWhenAbsent
Attempts to retrieve one of the specified index files when a directory path is requested, otherwise, it renders a directory listing.
IndexFiles
Attempts to retrieve one of the specified index files when a directory path is requested, otherwise, it returns a 404.
NoIndex
Returns a 404 if a directory path is requested.
Trait Implementations
sourceimpl Clone for IndexStrategy
impl Clone for IndexStrategy
sourcefn clone(&self) -> IndexStrategy
fn clone(&self) -> IndexStrategy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl From<IndexStrategyConfig> for IndexStrategy
impl From<IndexStrategyConfig> for IndexStrategy
sourcefn from(config: IndexStrategyConfig) -> Self
fn from(config: IndexStrategyConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for IndexStrategy
impl Send for IndexStrategy
impl Sync for IndexStrategy
impl Unpin for IndexStrategy
impl !UnwindSafe for IndexStrategy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more