File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -545,6 +545,11 @@ impl Function {
545545 } ) )
546546 }
547547
548+ /// Wraps a Rust function or closure, returning an opaque type that implements [`IntoLua`]
549+ /// trait.
550+ ///
551+ /// This function is similar to [`Function::wrap`] but any returned `Result` will be converted
552+ /// to a `ok, err` tuple without throwing an exception.
548553 #[ inline]
549554 pub fn wrap_raw < F , A > ( func : F ) -> impl IntoLua
550555 where
@@ -557,6 +562,10 @@ impl Function {
557562 } ) )
558563 }
559564
565+ /// Wraps a Rust mutable closure, returning an opaque type that implements [`IntoLua`] trait.
566+ ///
567+ /// This function is similar to [`Function::wrap_mut`] but any returned `Result` will be
568+ /// converted to a `ok, err` tuple without throwing an exception.
560569 #[ inline]
561570 pub fn wrap_raw_mut < F , A > ( func : F ) -> impl IntoLua
562571 where
@@ -592,6 +601,11 @@ impl Function {
592601 } ) )
593602 }
594603
604+ /// Wraps a Rust async function or closure, returning an opaque type that implements [`IntoLua`]
605+ /// trait.
606+ ///
607+ /// This function is similar to [`Function::wrap_async`] but any returned `Result` will be
608+ /// converted to a `ok, err` tuple without throwing an exception.
595609 #[ cfg( feature = "async" ) ]
596610 #[ cfg_attr( docsrs, doc( cfg( feature = "async" ) ) ) ]
597611 pub fn wrap_raw_async < F , A > ( func : F ) -> impl IntoLua
You can’t perform that action at this time.
0 commit comments