Struct gdnative_doc::backend::Generator
source · [−]pub struct Generator<'a> {
pub resolver: &'a Resolver,
pub documentation: &'a Documentation,
pub markdown_options: MarkdownOptions,
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: MarkdownOptions
Enabled markdown options
opening_comment: bool
Control if an opening comment with meta-information should ba added to generated files.
Implementations
sourceimpl<'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>
<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):
**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> 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more