Skip to main content

FolderIndex

Trait FolderIndex 

Source
pub trait FolderIndex {
    // Required methods
    fn is_dir(&self, root_rel: &str) -> bool;
    fn dir_has_markdown_index(&self, root_rel: &str) -> bool;
    fn dir_has_static_index(&self, root_rel: &str) -> Option<String>;
}

Required Methods§

Source

fn is_dir(&self, root_rel: &str) -> bool

Does a directory exist at this root-relative path?

Source

fn dir_has_markdown_index(&self, root_rel: &str) -> bool

Does this folder resolve a markdown index (→ FolderListing)? Build: a doc whose url_path is this folder’s index URL (covers content-folder promotion). Editor: the last build’s folder-index URL set, reconstructed from ArticleMap.pages ∪ the scanned directory set (see ADR-040) — NOT an index.md stat.

Source

fn dir_has_static_index(&self, root_rel: &str) -> Option<String>

Does this folder have a static index.html/.htm (and no markdown index)? Returns the index filename (→ FolderIndexIframe).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§