Add low-level warnings.

This commit is contained in:
Stephen Chung 2021-11-29 13:12:47 +08:00
parent ba0a6c667e
commit 4b4b7a753b
6 changed files with 28 additions and 8 deletions

View File

@ -86,7 +86,11 @@ impl Engine {
///
/// Not available under `no_function`.
///
/// # WARNING
/// # WARNING - Low Level API
///
/// This function is very low level.
///
/// ## Arguments
///
/// All the arguments are _consumed_, meaning that they're replaced by `()`.
/// This is to avoid unnecessarily cloning the arguments.

View File

@ -125,7 +125,11 @@ impl Engine {
///
/// This method will be removed in the next major version.
///
/// # WARNING
/// # WARNING - Low Level API
///
/// This function is very low level.
///
/// ## Arguments
///
/// All the arguments are _consumed_, meaning that they're replaced by `()`.
/// This is to avoid unnecessarily cloning the arguments.
@ -221,7 +225,11 @@ impl Dynamic {
impl NativeCallContext<'_> {
/// Call a function inside the call context.
///
/// # WARNING
/// # WARNING - Low Level API
///
/// This function is very low level.
///
/// ## Arguments
///
/// All arguments may be _consumed_, meaning that they may be replaced by `()`. This is to avoid
/// unnecessarily cloning the arguments.
@ -273,7 +281,11 @@ impl FnPtr {
///
/// This method will be removed in the next major version.
///
/// # WARNING
/// # WARNING - Low Level API
///
/// This function is very low level.
///
/// ## Arguments
///
/// All the arguments are _consumed_, meaning that they're replaced by `()`.
/// This is to avoid unnecessarily cloning the arguments.

View File

@ -154,7 +154,7 @@ impl Engine {
///
/// This function is very low level. It takes a list of [`TypeId`][std::any::TypeId]'s indicating the actual types of the parameters.
///
/// # Arguments
/// ## Arguments
///
/// Arguments are simply passed in as a mutable array of [`&mut Dynamic`][crate::Dynamic],
/// The arguments are guaranteed to be of the correct types matching the [`TypeId`][std::any::TypeId]'s.

View File

@ -230,7 +230,11 @@ impl<'a> NativeCallContext<'a> {
/// If `is_method_call` is [`true`], the first argument is assumed to be the `this` pointer for
/// a script-defined function (or the object of a method call).
///
/// # WARNING
/// # WARNING - Low Level API
///
/// This function is very low level.
///
/// # Arguments
///
/// All arguments may be _consumed_, meaning that they may be replaced by `()`. This is to avoid
/// unnecessarily cloning the arguments.

View File

@ -741,7 +741,7 @@ impl Module {
///
/// This function is very low level.
///
/// # Arguments
/// ## Arguments
///
/// A list of [`TypeId`]'s is taken as the argument types.
///

View File

@ -204,7 +204,7 @@ impl FnPtr {
///
/// This function is very low level.
///
/// # Arguments
/// ## Arguments
///
/// All the arguments are _consumed_, meaning that they're replaced by `()`.
/// This is to avoid unnecessarily cloning the arguments.