Struct gdnative_doc::Builder [−][src]
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
.
Implementations
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.
Example
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.
Example
let builder = Builder::new().add_backend(BuiltinBackend::Markdown, PathBuf::from("doc"));
pub fn add_backend_with_callbacks(
self,
callbacks: Box<dyn Callbacks>,
output_dir: PathBuf
) -> Self
[src]
self,
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
Auto Trait Implementations
impl !RefUnwindSafe for Builder
[src]
impl !Send for Builder
[src]
impl !Sync for Builder
[src]
impl Unpin for Builder
[src]
impl !UnwindSafe for Builder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,