pub struct DocumentationGenerator {
pub readme_config: ReadmeConfig,
pub sections: HashMap<String, DocumentationSection>,
pub api_docs: HashMap<String, ApiDocumentation>,
}Expand description
Documentation Generator
Fields§
§readme_config: ReadmeConfigREADME configuration
sections: HashMap<String, DocumentationSection>Documentation sections
api_docs: HashMap<String, ApiDocumentation>API documentation
Implementations§
Source§impl DocumentationGenerator
impl DocumentationGenerator
Sourcepub fn new(config: ReadmeConfig) -> Self
pub fn new(config: ReadmeConfig) -> Self
Create a new documentation generator
Sourcepub fn generate_readme(&self) -> Result<String>
pub fn generate_readme(&self) -> Result<String>
Generate README from project structure
Sourcepub fn extract_api_documentation(
&mut self,
code: &str,
) -> Result<Vec<ApiDocumentation>>
pub fn extract_api_documentation( &mut self, code: &str, ) -> Result<Vec<ApiDocumentation>>
Extract API documentation from code
Sourcepub fn synchronize_documentation(
&self,
old_code: &str,
new_code: &str,
) -> Result<SyncResult>
pub fn synchronize_documentation( &self, old_code: &str, new_code: &str, ) -> Result<SyncResult>
Synchronize documentation with code changes
Sourcepub fn calculate_coverage(&self, code: &str) -> Result<DocumentationCoverage>
pub fn calculate_coverage(&self, code: &str) -> Result<DocumentationCoverage>
Calculate documentation coverage
Sourcepub fn add_section(
&mut self,
key: impl Into<String>,
section: DocumentationSection,
)
pub fn add_section( &mut self, key: impl Into<String>, section: DocumentationSection, )
Add a documentation section
Sourcepub fn add_api_documentation(
&mut self,
key: impl Into<String>,
api_doc: ApiDocumentation,
)
pub fn add_api_documentation( &mut self, key: impl Into<String>, api_doc: ApiDocumentation, )
Add API documentation
Sourcepub fn get_sorted_sections(&self) -> Vec<&DocumentationSection>
pub fn get_sorted_sections(&self) -> Vec<&DocumentationSection>
Get all sections sorted by order
Trait Implementations§
Source§impl Clone for DocumentationGenerator
impl Clone for DocumentationGenerator
Source§fn clone(&self) -> DocumentationGenerator
fn clone(&self) -> DocumentationGenerator
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 DocumentationGenerator
impl RefUnwindSafe for DocumentationGenerator
impl Send for DocumentationGenerator
impl Sync for DocumentationGenerator
impl Unpin for DocumentationGenerator
impl UnwindSafe for DocumentationGenerator
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> 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>
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