Struct gdnative_doc::Builder[][src]

pub struct Builder { /* fields omitted */ }

A builder for generating godot documentation in various formats.

For each format you want to generate, you must add a backend via add_backend or add_backend_with_callbacks.


impl Builder[src]

pub fn new() -> Self[src]

Create a default Builder with no backends.

pub fn user_config(self, config: ConfigFile) -> Self[src]

Set user configuration options.

See the ConfigFile documentation for information about the configuration file format.

pub fn package(self, package: Package) -> Self[src]

Specify the crate to document.

The Builder will try to automatically determine which crate you want to document. If this fails or you are not satisfied with its guess, you can use this function to manually specify the crate you want to refer to.

This can be either the name of the crate, or directly the path of the root file.

Only one crate can be documented at a time: if this function is called multiple times, the last call will prevail.


let builder = Builder::new().package(Package::Name("my-gdnative-crate".to_string()));

pub fn add_backend(self, backend: BuiltinBackend, output_dir: PathBuf) -> Self[src]

Add a new builtin backend to the builder.


let builder = Builder::new().add_backend(BuiltinBackend::Markdown, PathBuf::from("doc"));

pub fn add_backend_with_callbacks(
    callbacks: Box<dyn Callbacks>,
    output_dir: PathBuf
) -> Self

Add a new backend to the builder, with custom callbacks encoding functions.

See the backend module for how to implement your own backend.

pub fn build(self) -> Result<()>[src]

Build the documentation.

This will generate the documentation for each specified backend, creating the ouput directories if needed.

Trait Implementations

impl Debug for Builder[src]

impl Default for Builder[src]

Auto Trait Implementations

impl !RefUnwindSafe for Builder

impl !Send for Builder

impl !Sync for Builder

impl Unpin for Builder

impl !UnwindSafe for Builder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.