Struct doc_chunks::Documentation
source · pub struct Documentation { /* private fields */ }
Expand description
Collection of all the documentation entries across the project
Implementations§
source§impl 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§
source§impl Clone for Documentation
impl Clone for Documentation
source§fn clone(&self) -> Documentation
fn clone(&self) -> Documentation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Documentation
impl Debug for Documentation
source§impl IntoIterator for Documentation
impl IntoIterator for Documentation
§type Item = (ContentOrigin, Vec<CheckableChunk>)
type Item = (ContentOrigin, Vec<CheckableChunk>)
§type IntoIter = IntoIter<ContentOrigin, Vec<CheckableChunk>>
type IntoIter = IntoIter<ContentOrigin, Vec<CheckableChunk>>
Auto Trait Implementations§
impl Freeze for Documentation
impl RefUnwindSafe for Documentation
impl Send for Documentation
impl Sync for Documentation
impl Unpin for Documentation
impl UnwindSafe for Documentation
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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