Struct user_doc_doc_data::DocDict[][src]

pub struct DocDict(pub DocDictTree, pub Vec<(Vec<usize>, String)>);
Expand description

A dictionary of doc

Tuple Fields

0: DocDictTree

The dictionary tree

1: Vec<(Vec<usize>, String)>

Backlinks and blurbs

Implementations

pub fn add_entry(
    &mut self,
    documentable: Documentable,
    name_opt: Option<String>,
    number_opt: Option<usize>,
    overwrite_opt: Option<bool>
) -> Result<()>

Add an entry to a documentation dictionary

Add the path specified to a documentation dictionary, filling with empty subtrees to get there. Return Ok(()) on success.

  • If the path exists, fail unless overwrite_opt contains true

Produce a depth-first, immutable iterator over the entries.

  • The iterator item includes a slug of chapters, the current entry node, and the number of sub entries for the current node The iterator will produce entries for the chapters AS WELL AS entries for the subchapters of those chapters.

Expand this doc dict into directories at the given directory path

pub fn find_next_entry_number(&self) -> usize

Find the next available (unused) entry number in a documentation dictionary

pub fn get_entry_at_numeric_path(
    &self,
    path: &[usize]
) -> Option<&DocDictEntryValueType>

Get an immutable reference to an entry at the specified numeric path. Returns None if the a path is not present.

pub fn get_mut_entry_at_numeric_path(
    &mut self,
    path: &[usize]
) -> Option<&mut DocDictEntryValueType>

Get a mutable reference to an entry at the specified numeric path. Returns None if the a path is not present.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Deserialize this value from the given Serde deserializer. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.