pub struct Generator<'a> {
pub resolver: &'a Resolver,
pub documentation: &'a Documentation,
pub markdown_options: Options,
pub opening_comment: bool,
}
Expand description
Holds the information necessary to generate the output files.
This is used by structures implementing Callbacks
.
Fields§
§resolver: &'a Resolver
Used to resolve links.
documentation: &'a Documentation
Holds the crate’s documentation.
markdown_options: Options
Enabled markdown options
opening_comment: bool
Control if an opening comment with meta-information should ba added to generated files.
Implementations§
Source§impl<'a> Generator<'a>
impl<'a> Generator<'a>
Sourcepub fn generate_root_file(
&self,
extension: &str,
callbacks: &mut dyn Callbacks,
) -> String
pub fn generate_root_file( &self, extension: &str, callbacks: &mut dyn Callbacks, ) -> String
Generate the root documentation file of the crate.
The following will be generated (in markdown style):
<crate documentation>
# Classes:
<list of GDNative classes>
This then uses Callbacks::encode
to encode this in the target format.
Sourcepub fn generate_file(
&self,
name: &str,
class: &GdnativeClass,
callbacks: &mut dyn Callbacks,
) -> String
pub fn generate_file( &self, name: &str, class: &GdnativeClass, callbacks: &mut dyn Callbacks, ) -> String
Generate the documentation for a class.
The following will be generated (in markdown style):
# <class name>
**Inherit:** <inherited class>
## Description
<class documentation>
## Properties
<table of class properties>
## Methods
<table of class methods>
## Properties Descriptions
<list of the class properties with their documentation>
## Methods Descriptions
<list of the class methods with their documentation>
This then uses Callbacks::encode
to encode this in the target format.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Generator<'a>
impl<'a> RefUnwindSafe for Generator<'a>
impl<'a> Send for Generator<'a>
impl<'a> Sync for Generator<'a>
impl<'a> Unpin for Generator<'a>
impl<'a> UnwindSafe for Generator<'a>
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