@@ -43,6 +43,11 @@ pub trait NativeClass: Sized + 'static {
43
43
/// See module-level documentation on `user_data` for more info.
44
44
type UserData : UserData < Target = Self > ;
45
45
46
+ // TODO(0.11) bugfix for https://github.com/godot-rust/godot-rust/issues/885
47
+ // * Rename init, register_properties, register by prefixing them with "nativeclass_"
48
+ // * Mark them as #[doc(hidden)]
49
+ // * Discourage manual NativeClass and NativeClassMethod impls
50
+
46
51
/// Function that creates a value of `Self`, used for the script-instance. The default
47
52
/// implementation simply panics.
48
53
///
@@ -53,6 +58,7 @@ pub trait NativeClass: Sized + 'static {
53
58
/// of such scripts can only be created from Rust using `Instance::emplace`. See
54
59
/// documentation on `Instance::emplace` for an example.
55
60
#[ inline]
61
+ #[ deprecated = "This method will be removed from the public API." ]
56
62
fn init ( _owner : TRef < ' _ , Self :: Base , Shared > ) -> Self {
57
63
panic ! (
58
64
"{} does not have a zero-argument constructor" ,
@@ -62,6 +68,7 @@ pub trait NativeClass: Sized + 'static {
62
68
63
69
/// Register any exported properties to Godot.
64
70
#[ inline]
71
+ #[ deprecated = "This method will be removed from the public API." ]
65
72
fn register_properties ( _builder : & ClassBuilder < Self > ) { }
66
73
67
74
/// Convenience method to create an `Instance<Self, Unique>`. This is a new `Self::Base`
@@ -111,6 +118,9 @@ pub trait StaticallyNamed: NativeClass {
111
118
/// Trait used to provide information of Godot-exposed methods of a script class.
112
119
pub trait NativeClassMethods : NativeClass {
113
120
/// Function that registers all exposed methods to Godot.
121
+ ///
122
+ // TODO see comment in NativeClass
123
+ #[ deprecated = "This method will be removed from the public API." ]
114
124
fn register ( builder : & ClassBuilder < Self > ) ;
115
125
}
116
126
0 commit comments