@@ -63,9 +63,16 @@ impl Callable {
63
63
self . as_inner ( ) . callv ( arguments)
64
64
}
65
65
66
- /// Returns the name of the method represented by this callable.
66
+ /// Returns the name of the method represented by this callable. If the callable is a lambda function,
67
+ /// returns the function's name.
68
+ ///
69
+ /// ## Known Bugs
70
+ ///
71
+ /// Getting the name of a lambda errors instead of returning its name, see [godot#73052].
67
72
///
68
73
/// _Godot equivalent: `get_method`_
74
+ ///
75
+ /// [godot#73052]: https://github.com/godotengine/godot/issues/73052
69
76
pub fn method_name ( & self ) -> Option < StringName > {
70
77
let method_name = self . as_inner ( ) . get_method ( ) ;
71
78
if method_name. is_empty ( ) {
@@ -111,7 +118,13 @@ impl Callable {
111
118
/// Custom callables are mainly created from bind or unbind. In GDScript, lambda functions are also
112
119
/// custom callables.
113
120
///
121
+ /// If a callable is not a custom callable, then it is considered a standard callable, this function is
122
+ /// the opposite of [`Callable.is_standard`].
123
+ ///
114
124
/// _Godot equivalent: `is_custom`_
125
+ ///
126
+ /// [`Callable.is_standard`]: https://docs.godotengine.org/en/stable/classes/class_callable.html#class-callable-method-is-standard
127
+ #[ doc( alias = "is_standard" ) ]
115
128
pub fn is_custom ( & self ) -> bool {
116
129
self . as_inner ( ) . is_custom ( )
117
130
}
@@ -126,15 +139,6 @@ impl Callable {
126
139
self . as_inner ( ) . is_null ( )
127
140
}
128
141
129
- /// Returns true if this callable is a standard callable. This method is the opposite of [`is_custom`].
130
- ///
131
- /// Returns `false` if this callable is a lambda function.
132
- ///
133
- /// _Godot equivalent: `is_standard`_
134
- pub fn is_standard ( & self ) -> bool {
135
- self . as_inner ( ) . is_standard ( )
136
- }
137
-
138
142
/// Returns true if the callable's object exists and has a valid method name assigned, or is a custom
139
143
/// callable.
140
144
///
0 commit comments