Struct doc_chunks::Documentation
source · pub struct Documentation { /* private fields */ }
Expand description
Collection of all the documentation entries across the project
Implementations
sourceimpl Documentation
impl Documentation
sourcepub fn contains_key(&self, key: &ContentOrigin) -> bool
pub fn contains_key(&self, key: &ContentOrigin) -> bool
Check if a particular key is contained.
sourcepub fn iter(
&self
) -> impl Iterator<Item = (&ContentOrigin, &Vec<CheckableChunk>)>
pub fn iter(
&self
) -> impl Iterator<Item = (&ContentOrigin, &Vec<CheckableChunk>)>
Borrowing iterator across content origins and associated sets of chunks.
sourcepub fn par_iter(
&self
) -> impl ParallelIterator<Item = (&ContentOrigin, &Vec<CheckableChunk>)>
pub fn par_iter(
&self
) -> impl ParallelIterator<Item = (&ContentOrigin, &Vec<CheckableChunk>)>
Borrowing iterator across content origins and associated sets of chunks.
sourcepub fn into_par_iter(
self
) -> impl ParallelIterator<Item = (ContentOrigin, Vec<CheckableChunk>)>
pub fn into_par_iter(
self
) -> impl ParallelIterator<Item = (ContentOrigin, Vec<CheckableChunk>)>
Consuming iterator across content origins and associated sets of chunks.
sourcepub fn extend<I, J>(&mut self, other: I)where
I: IntoIterator<Item = (ContentOrigin, Vec<CheckableChunk>), IntoIter = J>,
J: Iterator<Item = (ContentOrigin, Vec<CheckableChunk>)>,
pub fn extend<I, J>(&mut self, other: I)where
I: IntoIterator<Item = (ContentOrigin, Vec<CheckableChunk>), IntoIter = J>,
J: Iterator<Item = (ContentOrigin, Vec<CheckableChunk>)>,
Extend self
by joining in other Documentation
s.
sourcepub fn add_inner(&mut self, origin: ContentOrigin, chunks: Vec<CheckableChunk>)
pub fn add_inner(&mut self, origin: ContentOrigin, chunks: Vec<CheckableChunk>)
Adds a set of CheckableChunk
s to the documentation to be checked.
sourcepub fn add_rust(
&mut self,
origin: ContentOrigin,
content: &str,
doc_comments: bool,
dev_comments: bool
) -> Result<()>
pub fn add_rust(
&mut self,
origin: ContentOrigin,
content: &str,
doc_comments: bool,
dev_comments: bool
) -> Result<()>
Adds a rust content str to the documentation.
sourcepub fn add_cargo_manifest_description(
&mut self,
path: PathBuf,
manifest_content: &str
) -> Result<()>
pub fn add_cargo_manifest_description(
&mut self,
path: PathBuf,
manifest_content: &str
) -> Result<()>
Adds a content string to the documentation sourced from the
description
field in a Cargo.toml
manifest.
sourcepub fn add_commonmark(
&mut self,
origin: ContentOrigin,
content: &str
) -> Result<()>
pub fn add_commonmark(
&mut self,
origin: ContentOrigin,
content: &str
) -> Result<()>
Adds a common mark content str to the documentation.
sourcepub fn get(&self, origin: &ContentOrigin) -> Option<&[CheckableChunk]>
pub fn get(&self, origin: &ContentOrigin) -> Option<&[CheckableChunk]>
Obtain the set of chunks for a particular origin.
sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Count the number of origins.
sourcepub fn load_from_str(
origin: ContentOrigin,
content: &str,
doc_comments: bool,
dev_comments: bool
) -> Self
pub fn load_from_str(
origin: ContentOrigin,
content: &str,
doc_comments: bool,
dev_comments: bool
) -> Self
Load a document from a single string with a defined origin.
pub fn len(&self) -> usize
Trait Implementations
sourceimpl Clone for Documentation
impl Clone for Documentation
sourcefn clone(&self) -> Documentation
fn clone(&self) -> Documentation
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more