shopify_function_wasm_api 0.3.1

High-level interface for interfacing with the Shopify Function Wasm API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! The log API for the Shopify Function Wasm API.

use crate::Context;

pub(super) fn log_utf8_str(message: &str) {
    unsafe { crate::shopify_function_log_new_utf8_str(message.as_ptr(), message.len()) };
}

impl Context {
    /// Log `message`.
    pub fn log(&mut self, message: &str) {
        log_utf8_str(message)
    }
}