Trait gdnative_doc::backend::Callbacks [−][src]
Callbacks to encode markdown input in a given format.
This trait should be implemented if you want to make your own backend.
Required methods
fn extension(&self) -> &'static str
[src]
File extension for the files generated by this callback.
fn generate_files(
&mut self,
generator: Generator<'_>
) -> HashMap<String, String>
[src]
&mut self,
generator: Generator<'_>
) -> HashMap<String, String>
Drive the generation process.
This returns a map from file names (relative to the output directory) to their contents.
You can find inspiration about how to implement this in the source code, for
example in src/backend/html.rs
.
fn encode(&mut self, s: &mut String, events: Vec<Event<'_>>)
[src]
Encode the stream of events
in s
.
Provided methods
fn start_method(
&mut self,
_s: &mut String,
_resolver: &Resolver,
_method: &Method
)
[src]
&mut self,
_s: &mut String,
_resolver: &Resolver,
_method: &Method
)
Called before encoding each method.
Default: does nothing
fn start_property(
&mut self,
_s: &mut String,
_resolver: &Resolver,
_property: &Property
)
[src]
&mut self,
_s: &mut String,
_resolver: &Resolver,
_property: &Property
)
Called before encoding each property.
Default: does nothing
Implementations
impl dyn Callbacks
[src]
pub fn start_method_default(
&mut self,
s: &mut String,
property: &Resolver,
method: &Method
)
[src]
&mut self,
s: &mut String,
property: &Resolver,
method: &Method
)
Default start_method implementation, implemented on dyn Callbacks
to avoid
code duplication.
This will create a level 3 header that looks like (in markdown):
### <a id="func-name"></a>func name(arg1: [type](link), ...) -> [type](link)
________
With appropriate linking.
pub fn start_property_default(
&mut self,
s: &mut String,
resolver: &Resolver,
property: &Property
)
[src]
&mut self,
s: &mut String,
resolver: &Resolver,
property: &Property
)
Default start_property implementation, implemented on dyn Callbacks
to avoid
code duplication.
This will create a level 3 header that looks like (in markdown):
### <a id="property-name"></a> name: [type](link)
________
With appropriate linking.