Struct gdnative_project_utils::Generator[][src]

pub struct Generator { /* fields omitted */ }

A builder type that holds all necessary information about the project to generate files in all the right places.

Implementations

impl Builder[src]

pub fn new() -> Self[src]

Construct a new Builder.

pub fn with_godot_project_dir(&mut self, dir: impl AsRef<Path>)[src]

REQUIRED Set the path to the root of the Godot project.

pub fn godot_project_dir(mut self: Self, dir: impl AsRef<Path>) -> Self[src]

REQUIRED Set the path to the root of the Godot project.

pub fn with_godot_resource_output_dir(&mut self, dir: impl AsRef<Path>)[src]

Set the path to the directory inside the Godot project to which the generates files should be saved.

pub fn godot_resource_output_dir(mut self: Self, dir: impl AsRef<Path>) -> Self[src]

Set the path to the directory inside the Godot project to which the generates files should be saved.

pub fn with_target_dir(&mut self, dir: impl AsRef<Path>)[src]

Set the path to the target directory in which cargo creates build artefacts.

pub fn target_dir(mut self: Self, dir: impl AsRef<Path>) -> Self[src]

Set the path to the target directory in which cargo creates build artefacts.

pub fn with_lib_format(&mut self, lib_format: LibFormat)[src]

Set the type of the GDNativeLibrary Format

pub fn lib_format(mut self: Self, lib_format: LibFormat) -> Self[src]

Set the type of the GDNativeLibrary Format

pub fn with_lib_name(&mut self, name: impl AsRef<str>)[src]

Set the name of the crate.

pub fn lib_name(mut self: Self, name: impl AsRef<str>) -> Self[src]

Set the name of the crate.

pub fn with_build_mode(&mut self, mode: BuildMode)[src]

Set the build mode of the crate.

This will affect the path the gdnlib resource points to.

pub fn build_mode(mut self: Self, mode: BuildMode) -> Self[src]

Set the build mode of the crate.

This will affect the path the gdnlib resource points to.

pub fn build(self, classes: Classes) -> Result<(), Error>[src]

Build and generate files for the crate and all classes.

Panics

This function panics if the godot_project_dir has not been set.

Trait Implementations

impl Default for Builder[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.