mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 05:38:19 +00:00
doc(c-api) Update documentation for clarity.
This commit is contained in:
@@ -223,9 +223,9 @@ pub extern "C" fn wasmer_metering_points_are_exhausted(instance: &wasm_instance_
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// This example is pointless as the number of points aren't updated
|
||||
/// by the WebAssembly module execution, it only illustrates the
|
||||
/// `wasmer_metering_set_remaining_points` function.
|
||||
/// This example only illustrates the
|
||||
/// `wasmer_metering_set_remaining_points` function, as the number of
|
||||
/// points aren't updated by the WebAssembly module execution
|
||||
///
|
||||
/// ```rust
|
||||
/// # use inline_c::assert_c;
|
||||
@@ -242,7 +242,7 @@ pub extern "C" fn wasmer_metering_points_are_exhausted(instance: &wasm_instance_
|
||||
/// }
|
||||
///
|
||||
/// int main() {
|
||||
/// // Set the initial amount of points to 10.
|
||||
/// // Set the initial amount of points to 7.
|
||||
/// wasmer_metering_t* metering = wasmer_metering_new(7, cost_function);
|
||||
///
|
||||
/// // Consume `metering` to produce `middleware`.
|
||||
|
||||
@@ -12,8 +12,8 @@ compile_error!("The `middlewares` feature requires the `compiler` feature to be
|
||||
|
||||
/// Opaque representing any kind of middleware.
|
||||
///
|
||||
/// It's used by `wasm_config_push_middleware`. A specific middleware
|
||||
/// is transformed into this type to get a generic middleware. See for
|
||||
/// Used by `wasm_config_push_middleware`. A specific middleware is
|
||||
/// transformed into this type to get a generic middleware. See for
|
||||
/// example
|
||||
/// [`wasmer_metering_as_middleware`][metering::wasmer_metering_as_middleware].
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in New Issue
Block a user