Skip to content

Commit

Permalink
deploy: 14aa232
Browse files Browse the repository at this point in the history
  • Loading branch information
StatisMike committed Dec 5, 2023
0 parents commit 180f900
Show file tree
Hide file tree
Showing 153 changed files with 5,997 additions and 0 deletions.
Empty file added .lock
Empty file.
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions crates.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window.ALL_CRATES = ["gd_props","gd_props_defs","gd_props_macros","tests"];
1 change: 1 addition & 0 deletions gd_props/all.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-fa3bb1812debf86c.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="gd_props" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0 (79e9716c9 2023-11-13)" data-channel="1.74.0" data-search-js="search-8be46b629f5f14a8.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="../static.files/main-c5bd66d33317d69f.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../gd_props/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a></nav><nav class="sidebar"><a class="logo-container" href="../gd_props/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2 class="location"><a href="#">Crate gd_props</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#derives">Derive Macros</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all items</h1><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="errors/enum.GdPropError.html">errors::GdPropError</a></li></ul><h3 id="traits">Traits</h3><ul class="all-items"><li><a href="traits/trait.GdProp.html">traits::GdProp</a></li><li><a href="traits/trait.GdPropLoader.html">traits::GdPropLoader</a></li><li><a href="traits/trait.GdPropSaver.html">traits::GdPropSaver</a></li></ul><h3 id="derives">Derive Macros</h3><ul class="all-items"><li><a href="derive.GdProp.html">GdProp</a></li><li><a href="derive.GdPropLoader.html">GdPropLoader</a></li><li><a href="derive.GdPropSaver.html">GdPropSaver</a></li></ul><h3 id="functions">Functions</h3><ul class="all-items"><li><a href="serde_gd/ext/fn.deserialize.html">serde_gd::ext::deserialize</a></li><li><a href="serde_gd/ext/fn.serialize.html">serde_gd::ext::serialize</a></li><li><a href="serde_gd/ext_option/fn.deserialize.html">serde_gd::ext_option::deserialize</a></li><li><a href="serde_gd/ext_option/fn.serialize.html">serde_gd::ext_option::serialize</a></li><li><a href="serde_gd/gd/fn.deserialize.html">serde_gd::gd::deserialize</a></li><li><a href="serde_gd/gd/fn.serialize.html">serde_gd::gd::serialize</a></li><li><a href="serde_gd/gd_option/fn.deserialize.html">serde_gd::gd_option::deserialize</a></li><li><a href="serde_gd/gd_option/fn.serialize.html">serde_gd::gd_option::serialize</a></li><li><a href="serde_gd/gd_vec/fn.deserialize.html">serde_gd::gd_vec::deserialize</a></li><li><a href="serde_gd/gd_vec/fn.serialize.html">serde_gd::gd_vec::serialize</a></li></ul></section></div></main></body></html>
12 changes: 12 additions & 0 deletions gd_props/derive.GdProp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Macro used to implement GdProp trait, which makes a rust-defined Godot Resource saveable and loadable to and from `.gdron` and `.gdbin` formats."><title>GdProp in gd_props - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-fa3bb1812debf86c.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="gd_props" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0 (79e9716c9 2023-11-13)" data-channel="1.74.0" data-search-js="search-8be46b629f5f14a8.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-c5bd66d33317d69f.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc derive"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../gd_props/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a></nav><nav class="sidebar"><a class="logo-container" href="../gd_props/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In gd_props</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Derive Macro <a href="index.html">gd_props</a>::<wbr><a class="derive" href="#">GdProp</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/gd_props_macros/lib.rs.html#24">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>#[derive(GdProp)]</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Macro used to implement <a href="gd_props_defs::traits::GdProp">GdProp</a> trait, which makes a rust-defined Godot <a href="godot::engine::Resource">Resource</a>
saveable and loadable to and from <code>.gdron</code> and <code>.gdbin</code> formats.</p>
<p>Provides compatibility with <a href="derive.GdPropSaver.html" title="derive gd_props::GdPropSaver">GdPropSaver</a> and <a href="derive.GdPropLoader.html" title="derive gd_props::GdPropLoader">GdPropLoader</a> deriving structs.</p>
<h3 id="example"><a href="#example">Example</a></h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>godot::prelude::GodotClass;
<span class="kw">use </span>gd_props::GdProp;
<span class="kw">use </span>serde::{Serialize, Deserialize};

<span class="attr">#[derive(GodotClass, Serialize, Deserialize, GdProp)]
#[class(init, base=Resource)]
</span><span class="kw">struct </span>MyResource {}</code></pre></div>
</div></details></section></div></main></body></html>
45 changes: 45 additions & 0 deletions gd_props/derive.GdPropLoader.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Create resource loader for GdProp resources."><title>GdPropLoader in gd_props - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-fa3bb1812debf86c.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="gd_props" data-themes="" data-resource-suffix="" data-rustdoc-version="1.74.0 (79e9716c9 2023-11-13)" data-channel="1.74.0" data-search-js="search-8be46b629f5f14a8.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-c5bd66d33317d69f.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc derive"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../gd_props/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a></nav><nav class="sidebar"><a class="logo-container" href="../gd_props/index.html"><img class="rust-logo" src="../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In gd_props</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Derive Macro <a href="index.html">gd_props</a>::<wbr><a class="derive" href="#">GdPropLoader</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/gd_props_macros/lib.rs.html#102">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>#[derive(GdPropLoader)]
{
// Attributes available to this derive:
#[register]
}
</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Create resource loader for <a href="gd_props_defs::traits::GdProp">GdProp</a> resources.</p>
<p>Macro used to implement <a href="gd_props_defs::traits::GdPropLoader">GdPropLoader</a> trait for a bare rust-defined
<a href="godot::engine::ResourceFormatLoader">ResourceFormatLoader</a>, allowing registered resources deriving <a href="derive.GdProp.html" title="derive gd_props::GdProp">GdProp</a> to be
loaded with it from <code>.gdron</code> and <code>.gdbin</code> files.</p>
<p>Alongside implementing above trait, macro also implements <a href="godot::engine::IResourceFormatLoader">IResourceFormatLoader</a>,
so you can’t implement it yourself.</p>
<h3 id="macro-attributes"><a href="#macro-attributes">Macro attributes</a></h3>
<ul>
<li><code>#[register(MyGdPropource, MyOtherGdPropource)]</code> - registers <code>Resource</code>s deriving <a href="derive.GdProp.html" title="derive gd_props::GdProp">GdProp</a> to be handled by this
struct. You can provide multiple resource in one attribute, you can also add multiple <code>register</code> attributes with
resources.</li>
</ul>
<h3 id="example"><a href="#example">Example</a></h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>godot::prelude::GodotClass;
<span class="kw">use </span>gd_props::GdPropLoader;

<span class="attr">#[derive(GodotClass, GdPropLoader)]
#[class(init, tool, base=ResourceFormatLoader)]
#[register(MyResource, MyOtherResource)]
</span><span class="kw">pub struct </span>MyRonLoader {}</code></pre></div>
<h3 id="register-your-gdproploader"><a href="#register-your-gdproploader">Register your <code>GdPropLoader</code></a></h3>
<p>To make the Loader recognizable by editor, remember to add <code>tool</code> value to the <code>GodotClass</code> macro <code>#[class]</code> attribute.
Additionally, you need to register the loader in the <a href="godot::engine::ResourceLoader">ResourceLoader</a>
singleton at Godot runtime initialization. Recommended way of registration is to call <code>GdPropourceLoader::register_loader()</code> associated
function in <a href="godot::prelude::ExtensionLibrary">ExtensionLibrary</a> implementation:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered"><code>
<span class="kw">use </span>godot::init::<span class="kw-2">*</span>;

<span class="kw">struct </span>MyGdExtension;

<span class="kw">unsafe impl </span>ExtensionLibrary <span class="kw">for </span>MyGdExtension {
<span class="kw">fn </span>on_level_init(_level: InitLevel) {
<span class="kw">use </span>gd_props::traits::GdPropLoader <span class="kw">as _</span>;
<span class="kw">if </span>_level == InitLevel::Scene {
MyResLoader::register_loader();
}
}
}</code></pre></div>
</div></details></section></div></main></body></html>
Loading

0 comments on commit 180f900

Please sign in to comment.