@@ -99,6 +99,15 @@ impl FnPtr {
9999 /// # Errors
100100 ///
101101 /// 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." ]
102111 #[ inline( always) ]
103112 pub fn from_fn (
104113 name : impl Into < ImmutableString > ,
@@ -109,13 +118,23 @@ impl FnPtr {
109118 + Sync
110119 + ' static ,
111120 ) -> RhaiResultOf < Self > {
121+ #[ allow( deprecated) ]
112122 Self :: from_dyn_fn ( name, Box :: new ( func) )
113123 }
114124 /// Create a new function pointer from a native Rust function.
115125 ///
116126 /// # Errors
117127 ///
118128 /// 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." ]
119138 #[ inline]
120139 pub fn from_dyn_fn (
121140 name : impl Into < ImmutableString > ,
0 commit comments