Struct BuildEnvironment

Source
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

Source

pub fn new(config: BuildConfig) -> Self

Source

pub fn add_document(&mut self, docname: String, mtime: f64)

Add a document to the environment

Source

pub fn doc2path(&self, docname: &str) -> PathBuf

Get document path from docname

Source

pub fn collect_relations( &self, ) -> HashMap<String, (Option<String>, Option<String>, Option<String>)>

Collect relations between documents

Source

pub fn doc_needs_update(&self, docname: &str, source_path: &PathBuf) -> bool

Check if document needs to be updated

Source

pub fn update_domain_object( &mut self, domain_name: &str, obj_type: &str, object: DomainObject, )

Update domain object

Source

pub fn get_all_objects(&self) -> Vec<&DomainObject>

Get all objects from all domains

Trait Implementations§

Source§

impl Clone for BuildEnvironment

Source§

fn clone(&self) -> BuildEnvironment

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BuildEnvironment

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.