pub struct HTMLBuilder {Show 33 fields
pub name: String,
pub format: String,
pub epilog: String,
pub out_suffix: String,
pub link_suffix: String,
pub searchindex_filename: String,
pub allow_parallel: bool,
pub copysource: bool,
pub use_index: bool,
pub embedded: bool,
pub search: bool,
pub download_support: bool,
pub supported_image_types: Vec<String>,
pub supported_remote_images: bool,
pub supported_data_uri_images: bool,
pub outdir: PathBuf,
pub srcdir: PathBuf,
pub confdir: PathBuf,
pub static_dir: PathBuf,
pub sources_dir: PathBuf,
pub downloads_dir: PathBuf,
pub images_dir: PathBuf,
pub config: BuildConfig,
pub current_docname: String,
pub secnumbers: HashMap<String, Vec<u32>>,
pub imgpath: String,
pub dlpath: String,
pub css_files: Vec<CSSFile>,
pub js_files: Vec<JSFile>,
pub template_engine: TemplateEngine,
pub global_context: Map<String, Value>,
pub relations: HashMap<String, DocumentRelation>,
pub domain_indices: Vec<DomainIndex>,
}
Expand description
HTML Builder that mirrors Sphinx’s StandaloneHTMLBuilder
Fields§
§name: String
§format: String
§epilog: String
§out_suffix: String
§link_suffix: String
§searchindex_filename: String
§allow_parallel: bool
§copysource: bool
§use_index: bool
§embedded: bool
§search: bool
§download_support: bool
§supported_image_types: Vec<String>
§supported_remote_images: bool
§supported_data_uri_images: bool
§outdir: PathBuf
§srcdir: PathBuf
§confdir: PathBuf
§static_dir: PathBuf
§sources_dir: PathBuf
§downloads_dir: PathBuf
§images_dir: PathBuf
§config: BuildConfig
§current_docname: String
§secnumbers: HashMap<String, Vec<u32>>
§imgpath: String
§dlpath: String
§css_files: Vec<CSSFile>
§js_files: Vec<JSFile>
§template_engine: TemplateEngine
§global_context: Map<String, Value>
Global template context
relations: HashMap<String, DocumentRelation>
§domain_indices: Vec<DomainIndex>
Implementations§
Source§impl HTMLBuilder
impl HTMLBuilder
pub fn new( config: BuildConfig, srcdir: PathBuf, outdir: PathBuf, ) -> Result<Self>
Sourcepub async fn init(&mut self) -> Result<()>
pub async fn init(&mut self) -> Result<()>
Initialize the builder (mirrors Sphinx’s init method)
Sourcepub async fn write_doc(
&mut self,
docname: &str,
doctree: &Document,
) -> Result<()>
pub async fn write_doc( &mut self, docname: &str, doctree: &Document, ) -> Result<()>
Write a single document (mirrors Sphinx’s write_doc)
Sourcepub fn get_target_uri(&self, docname: &str) -> String
pub fn get_target_uri(&self, docname: &str) -> String
Get target URI for a document
Sourcepub async fn gen_indices(&mut self) -> Result<()>
pub async fn gen_indices(&mut self) -> Result<()>
Generate indices (mirrors Sphinx’s gen_indices)
Sourcepub async fn copy_static_files(&self) -> Result<()>
pub async fn copy_static_files(&self) -> Result<()>
Copy static files (mirrors Sphinx’s copy_static_files)
Sourcepub async fn copy_image_files(
&self,
images: &HashMap<String, String>,
) -> Result<()>
pub async fn copy_image_files( &self, images: &HashMap<String, String>, ) -> Result<()>
Copy image files
Sourcepub async fn copy_download_files(
&self,
downloads: &HashMap<String, String>,
) -> Result<()>
pub async fn copy_download_files( &self, downloads: &HashMap<String, String>, ) -> Result<()>
Copy download files
Sourcepub async fn dump_inventory(&self, env: &BuildEnvironment) -> Result<()>
pub async fn dump_inventory(&self, env: &BuildEnvironment) -> Result<()>
Dump object inventory (mirrors Sphinx’s dump_inventory)
Sourcepub async fn dump_search_index(&self, _search_index: &SearchIndex) -> Result<()>
pub async fn dump_search_index(&self, _search_index: &SearchIndex) -> Result<()>
Dump search index
Sourcepub async fn write_build_info(&self) -> Result<()>
pub async fn write_build_info(&self) -> Result<()>
Write build info file
Sourcepub async fn finish(
&mut self,
env: &BuildEnvironment,
search_index: &SearchIndex,
) -> Result<()>
pub async fn finish( &mut self, env: &BuildEnvironment, search_index: &SearchIndex, ) -> Result<()>
Finish the build process
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HTMLBuilder
impl !RefUnwindSafe for HTMLBuilder
impl Send for HTMLBuilder
impl Sync for HTMLBuilder
impl Unpin for HTMLBuilder
impl !UnwindSafe for HTMLBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more