File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
gdnative-core/src/core_types Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,15 @@ mod serialize;
14
14
15
15
// TODO: implement Debug, PartialEq, etc.
16
16
17
- /// A `Variant` can represent many of godot's core types.
17
+ /// A `Variant` can represent all Godot values ( core types or `Object` class instances) .
18
18
///
19
- /// The underlying data can be either stored inline or reference-counted,
20
- /// dependning on the size of the type and whether the it is trivially copyable.
19
+ /// The underlying data is either stored inline or reference-counted on the heap,
20
+ /// depending on the size of the type and whether the it is trivially copyable.
21
+ ///
22
+ /// If you compile godot-rust with the `serde` feature enabled, you will have
23
+ /// access to serialization/deserialization support: the traits `Serializable`
24
+ /// and `Deserializable` will be automatically implemented on [`VariantDispatch`]
25
+ /// as well as most of the types in [`core_types`].
21
26
pub struct Variant ( pub ( crate ) sys:: godot_variant ) ;
22
27
23
28
macro_rules! variant_constructors {
Original file line number Diff line number Diff line change 15
15
//!
16
16
//! Since it is easy to expect containers and other types to allocate a copy of their
17
17
//! content when using the `Clone` trait, some types do not implement `Clone` and instead
18
- //! implement [`NewRef`](./trait. NewRef.html ) which provides a `new_ref(&self) -> Self` method
18
+ //! implement [`NewRef`](object:: NewRef) which provides a `new_ref(&self) -> Self` method
19
19
//! to create references to the same collection or object.
20
20
//!
21
21
//! ## Generated API types
41
41
//!
42
42
//! ## Feature flags
43
43
//!
44
- //! ### `bindings`
45
- //!
46
- //! *Enabled* by default. Includes the crates.io version of the bindings in the `api` module.
44
+ //! * `bindings` -- *enabled* by default. Includes the crates.io version of the bindings in the
45
+ //! `api` module. Disable if you want to use a custom Godot version.
46
+ //! * `serde` -- *disabled* by default. Enable for `serde` support. See also
47
+ //! [`Variant`](core_types::Variant).
48
+ //! * `formatted` -- *disabled* by default. Enable if the generated binding source code should
49
+ //! be human-readable.
47
50
//!
48
51
//! [thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html
49
52
//! [custom-version]: https://github.com/godot-rust/godot-rust/#other-versions-or-custom-builds
You can’t perform that action at this time.
0 commit comments