@@ -99,6 +99,15 @@ impl FnPtr {
99
99
/// # Errors
100
100
///
101
101
/// Returns an error if the function name is not a valid identifier or is a reserved keyword.
102
+ ///
103
+ /// # WARNING - Unstable API
104
+ ///
105
+ /// This API is volatile and may change in the future.
106
+ ///
107
+ /// # Callback Function Signature
108
+ ///
109
+ /// `Fn(context: NativeCallContext, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult>>`
110
+ #[ deprecated = "This API is NOT deprecated, but it is considered volatile and may change in the future." ]
102
111
#[ inline( always) ]
103
112
pub fn from_fn (
104
113
name : impl Into < ImmutableString > ,
@@ -109,13 +118,23 @@ impl FnPtr {
109
118
+ Sync
110
119
+ ' static ,
111
120
) -> RhaiResultOf < Self > {
121
+ #[ allow( deprecated) ]
112
122
Self :: from_dyn_fn ( name, Box :: new ( func) )
113
123
}
114
124
/// Create a new function pointer from a native Rust function.
115
125
///
116
126
/// # Errors
117
127
///
118
128
/// Returns an error if the function name is not a valid identifier or is a reserved keyword.
129
+ ///
130
+ /// # WARNING - Unstable API
131
+ ///
132
+ /// This API is volatile and may change in the future.
133
+ ///
134
+ /// # Callback Function Signature
135
+ ///
136
+ /// `Fn(context: NativeCallContext, &mut [&mut Dynamic]) -> Result<Dynamic, Box<EvalAltResult>>`
137
+ #[ deprecated = "This API is NOT deprecated, but it is considered volatile and may change in the future." ]
119
138
#[ inline]
120
139
pub fn from_dyn_fn (
121
140
name : impl Into < ImmutableString > ,
0 commit comments