pub struct BuildEnvironment {Show 21 fields
pub config: BuildConfig,
pub domains: HashMap<String, Domain>,
pub found_docs: Vec<String>,
pub all_docs: HashMap<String, f64>,
pub dependencies: HashMap<String, HashSet<PathBuf>>,
pub included: HashMap<PathBuf, HashSet<String>>,
pub temp_data: HashMap<String, Value>,
pub ref_context: HashMap<String, Value>,
pub toctree_includes: HashMap<String, Vec<String>>,
pub files_to_rebuild: HashMap<String, HashSet<String>>,
pub glob_toctrees: HashSet<String>,
pub reread_always: HashSet<String>,
pub metadata: HashMap<String, HashMap<String, String>>,
pub titles: HashMap<String, String>,
pub longtitles: HashMap<String, String>,
pub tocs: HashMap<String, String>,
pub toc_secnumbers: HashMap<String, HashMap<String, Vec<u32>>>,
pub toc_fignumbers: HashMap<String, HashMap<String, HashMap<String, Vec<u32>>>>,
pub toc_num_entries: HashMap<String, usize>,
pub dlfiles: HashMap<String, (Option<String>, String)>,
pub images: HashMap<String, String>,
}
Expand description
Build environment that mirrors Sphinx’s BuildEnvironment
Fields§
§config: BuildConfig
§domains: HashMap<String, Domain>
§found_docs: Vec<String>
§all_docs: HashMap<String, f64>
§dependencies: HashMap<String, HashSet<PathBuf>>
§included: HashMap<PathBuf, HashSet<String>>
§temp_data: HashMap<String, Value>
§ref_context: HashMap<String, Value>
§toctree_includes: HashMap<String, Vec<String>>
§files_to_rebuild: HashMap<String, HashSet<String>>
§glob_toctrees: HashSet<String>
§reread_always: HashSet<String>
§metadata: HashMap<String, HashMap<String, String>>
§titles: HashMap<String, String>
§longtitles: HashMap<String, String>
§tocs: HashMap<String, String>
§toc_secnumbers: HashMap<String, HashMap<String, Vec<u32>>>
§toc_fignumbers: HashMap<String, HashMap<String, HashMap<String, Vec<u32>>>>
§toc_num_entries: HashMap<String, usize>
§dlfiles: HashMap<String, (Option<String>, String)>
§images: HashMap<String, String>
Implementations§
Source§impl BuildEnvironment
impl BuildEnvironment
pub fn new(config: BuildConfig) -> Self
Sourcepub fn add_document(&mut self, docname: String, mtime: f64)
pub fn add_document(&mut self, docname: String, mtime: f64)
Add a document to the environment
Sourcepub fn collect_relations(
&self,
) -> HashMap<String, (Option<String>, Option<String>, Option<String>)>
pub fn collect_relations( &self, ) -> HashMap<String, (Option<String>, Option<String>, Option<String>)>
Collect relations between documents
Sourcepub fn doc_needs_update(&self, docname: &str, source_path: &PathBuf) -> bool
pub fn doc_needs_update(&self, docname: &str, source_path: &PathBuf) -> bool
Check if document needs to be updated
Sourcepub fn update_domain_object(
&mut self,
domain_name: &str,
obj_type: &str,
object: DomainObject,
)
pub fn update_domain_object( &mut self, domain_name: &str, obj_type: &str, object: DomainObject, )
Update domain object
Sourcepub fn get_all_objects(&self) -> Vec<&DomainObject>
pub fn get_all_objects(&self) -> Vec<&DomainObject>
Get all objects from all domains
Trait Implementations§
Source§impl Clone for BuildEnvironment
impl Clone for BuildEnvironment
Source§fn clone(&self) -> BuildEnvironment
fn clone(&self) -> BuildEnvironment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BuildEnvironment
impl RefUnwindSafe for BuildEnvironment
impl Send for BuildEnvironment
impl Sync for BuildEnvironment
impl Unpin for BuildEnvironment
impl UnwindSafe for BuildEnvironment
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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