Enum gdnative_doc::backend::BuiltinBackend
source · [−]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
sourceimpl Clone for BuiltinBackend
impl Clone for BuiltinBackend
sourcefn clone(&self) -> BuiltinBackend
fn clone(&self) -> BuiltinBackend
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for BuiltinBackend
impl Debug for BuiltinBackend
sourceimpl Hash for BuiltinBackend
impl Hash for BuiltinBackend
sourceimpl Ord for BuiltinBackend
impl Ord for BuiltinBackend
sourcefn cmp(&self, other: &BuiltinBackend) -> Ordering
fn cmp(&self, other: &BuiltinBackend) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<BuiltinBackend> for BuiltinBackend
impl PartialEq<BuiltinBackend> for BuiltinBackend
sourcefn eq(&self, other: &BuiltinBackend) -> bool
fn eq(&self, other: &BuiltinBackend) -> bool
sourceimpl PartialOrd<BuiltinBackend> for BuiltinBackend
impl PartialOrd<BuiltinBackend> for BuiltinBackend
sourcefn partial_cmp(&self, other: &BuiltinBackend) -> Option<Ordering>
fn partial_cmp(&self, other: &BuiltinBackend) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for BuiltinBackend
impl Eq for BuiltinBackend
impl StructuralEq for BuiltinBackend
impl StructuralPartialEq for BuiltinBackend
Auto Trait Implementations
impl RefUnwindSafe for BuiltinBackend
impl Send for BuiltinBackend
impl Sync for BuiltinBackend
impl Unpin for BuiltinBackend
impl UnwindSafe for BuiltinBackend
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more