klave 0.5.0

A Rust SDK for the Klave platform.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::sdk;
use serde::Serialize;

pub fn send_string(param: &str) {
    sdk::notify(param);
}

pub fn send_json<T: Serialize>(value: &T) -> Result<(), Box<dyn std::error::Error>> {
    let json = serde_json::to_string(value)?; // Convert struct to JSON string
    sdk::notify(&json);
    Ok(())
}

pub fn on_success_notify(message: &str) {
    sdk::on_success_notify(message);
}