pub enum BuiltinBackend {
Markdown,
Html,
Gut,
}
Expand description
Backend already implemented by this library.
This must be used in the Builder::add_backend
method.
Variants§
Markdown
Markdown backend
This generates a file for every structure that implements NativeClass
+ an
index.md
file that contains the crate’s documentation.
Html
Html backend
This generates a file for every structure that implements NativeClass
+ an
index.html
file that contains the crate’s documentation.
Also generates css and javascript files (for styling and code highlighting).
Gut
Gut backend
This generates a file for every structure that implements NativeClass
,
generating tests from gdscript
code blocks:
#[derive(NativeClass)]
#[inherit(Node)]
pub struct MyClass {}
#[methods]
impl MyClass {
/// ```gdscript
/// var x = 0
/// assert_eq(x, 0)
/// ```
pub fn new(_: &Node) -> Self {
// ...
}
}
Will generates the following in MyClass.gd
:
extends "res://addons/gut/test.gd"
func test_new():
var x = 0
assert_eq(x, 0)
Trait Implementations§
Source§impl Clone for BuiltinBackend
impl Clone for BuiltinBackend
Source§fn clone(&self) -> BuiltinBackend
fn clone(&self) -> BuiltinBackend
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BuiltinBackend
impl Debug for BuiltinBackend
Source§impl Hash for BuiltinBackend
impl Hash for BuiltinBackend
Source§impl Ord for BuiltinBackend
impl Ord for BuiltinBackend
Source§fn cmp(&self, other: &BuiltinBackend) -> Ordering
fn cmp(&self, other: &BuiltinBackend) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BuiltinBackend
impl PartialEq for BuiltinBackend
Source§impl PartialOrd for BuiltinBackend
impl PartialOrd for BuiltinBackend
impl Copy for BuiltinBackend
impl Eq for BuiltinBackend
impl StructuralPartialEq for BuiltinBackend
Auto Trait Implementations§
impl Freeze for BuiltinBackend
impl RefUnwindSafe for BuiltinBackend
impl Send for BuiltinBackend
impl Sync for BuiltinBackend
impl Unpin for BuiltinBackend
impl UnwindSafe for BuiltinBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more