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;
1414
1515// TODO: implement Debug, PartialEq, etc.
1616
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) .
1818///
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`].
2126pub struct Variant ( pub ( crate ) sys:: godot_variant ) ;
2227
2328macro_rules! variant_constructors {
Original file line number Diff line number Diff line change 1515//!
1616//! Since it is easy to expect containers and other types to allocate a copy of their
1717//! 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
1919//! to create references to the same collection or object.
2020//!
2121//! ## Generated API types
4141//!
4242//! ## Feature flags
4343//!
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.
4750//!
4851//! [thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html
4952//! [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