pub struct ModularApiReferenceGenerator { /* private fields */ }Expand description
Main API reference generator with comprehensive formatting capabilities
Implementations§
Source§impl ApiReferenceGenerator
impl ApiReferenceGenerator
Sourcepub fn new(config: GeneratorConfig) -> ApiReferenceGenerator
pub fn new(config: GeneratorConfig) -> ApiReferenceGenerator
Create a new API reference generator with the given configuration
Sourcepub fn generate_from_crate(
&mut self,
crate_name: &str,
) -> Result<ApiReference, SklearsError>
pub fn generate_from_crate( &mut self, crate_name: &str, ) -> Result<ApiReference, SklearsError>
Generate API reference from a Rust crate
Sourcepub fn generate_from_files(
&mut self,
source_files: Vec<PathBuf>,
) -> Result<ApiReference, SklearsError>
pub fn generate_from_files( &mut self, source_files: Vec<PathBuf>, ) -> Result<ApiReference, SklearsError>
Generate API reference from source files
Sourcepub fn format_output(
&self,
api_ref: &ApiReference,
) -> Result<String, SklearsError>
pub fn format_output( &self, api_ref: &ApiReference, ) -> Result<String, SklearsError>
Format API reference to the configured output format
Sourcepub fn format_as(
&self,
api_ref: &ApiReference,
format: OutputFormat,
) -> Result<String, SklearsError>
pub fn format_as( &self, api_ref: &ApiReference, format: OutputFormat, ) -> Result<String, SklearsError>
Format API reference to a specific output format
Sourcepub fn formatter(&self) -> &DocumentFormatter
pub fn formatter(&self) -> &DocumentFormatter
Get the document formatter
Sourcepub fn formatter_mut(&mut self) -> &mut DocumentFormatter
pub fn formatter_mut(&mut self) -> &mut DocumentFormatter
Get a mutable reference to the document formatter
Trait Implementations§
Source§impl Debug for ApiReferenceGenerator
impl Debug for ApiReferenceGenerator
Source§impl Default for ApiReferenceGenerator
impl Default for ApiReferenceGenerator
Source§fn default() -> ApiReferenceGenerator
fn default() -> ApiReferenceGenerator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ApiReferenceGenerator
impl RefUnwindSafe for ApiReferenceGenerator
impl Send for ApiReferenceGenerator
impl Sync for ApiReferenceGenerator
impl Unpin for ApiReferenceGenerator
impl UnwindSafe for ApiReferenceGenerator
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> 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