Add documentation.

This commit is contained in:
Stephen Chung 2022-12-03 10:05:15 +08:00
parent f41bdb7769
commit 09272d08e9

View File

@ -72,7 +72,9 @@ pub fn by_value<T: Variant + Clone>(data: &mut Dynamic) -> T {
/// # Type Parameters /// # Type Parameters
/// ///
/// * `ARGS` - a tuple containing parameter types, with `&mut T` represented by `Mut<T>`. /// * `ARGS` - a tuple containing parameter types, with `&mut T` represented by `Mut<T>`.
/// * `NUM` - a constant generic containing the number of parameters, must be consistent with `ARGS`.
/// * `RET` - return type of the function; if the function returns `Result`, it is the unwrapped inner value type. /// * `RET` - return type of the function; if the function returns `Result`, it is the unwrapped inner value type.
/// * `RESULT` - a type to distinguish between multiple forms. Must match the function signature.
pub trait RegisterNativeFunction<ARGS, const NUM: usize, RET, RESULT> { pub trait RegisterNativeFunction<ARGS, const NUM: usize, RET, RESULT> {
/// Convert this function into a [`CallableFunction`]. /// Convert this function into a [`CallableFunction`].
#[must_use] #[must_use]