blob: b0ccb6a1cadbbdee1bf38c2ecf494e46ecef39df [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `bindings` mod in crate `teaclave_client_sdk`."><meta name="keywords" content="rust, rustlang, rust-lang, bindings"><title>teaclave_client_sdk::bindings - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../teaclave_client_sdk/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../teaclave_client_sdk/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module bindings</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../index.html">teaclave_client_sdk</a>::<wbr><a class="mod" href="#">bindings</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/teaclave_client_sdk/bindings.rs.html#18-593">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.c_entry.html" title="teaclave_client_sdk::bindings::c_entry struct">c_entry</a></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_approve_task_serialized.html" title="teaclave_client_sdk::bindings::teaclave_approve_task_serialized fn">teaclave_approve_task_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_assign_data_serialized.html" title="teaclave_client_sdk::bindings::teaclave_assign_data_serialized fn">teaclave_assign_data_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_authentication_set_credential.html" title="teaclave_client_sdk::bindings::teaclave_authentication_set_credential fn">teaclave_authentication_set_credential</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Set user’s credential with <code>user_id</code> and <code>user_token</code>. The function returns
0 for success. On error, the function returns 1.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_cancel_task.html" title="teaclave_client_sdk::bindings::teaclave_cancel_task fn">teaclave_cancel_task</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Cancel task with <code>task_id</code>. The function returns 0 for success. On error,
the function returns 1.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_cancel_task_serialized.html" title="teaclave_client_sdk::bindings::teaclave_cancel_task_serialized fn">teaclave_cancel_task_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_close_authentication_service.html" title="teaclave_client_sdk::bindings::teaclave_close_authentication_service fn">teaclave_close_authentication_service</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Close and free the authentication service handle, i.e., the
<code>AuthenticaionClient</code> type opaque pointer. The function returns 0 for
success. On error, the function returns 1.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_close_frontend_service.html" title="teaclave_client_sdk::bindings::teaclave_close_frontend_service fn">teaclave_close_frontend_service</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Close and free the frontend service handle, i.e., the <code>FrontendClient</code> type
opaque pointer. The function returns 0 for success. On error, the function
returns 1.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_connect_authentication_service.html" title="teaclave_client_sdk::bindings::teaclave_connect_authentication_service fn">teaclave_connect_authentication_service</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Connect to Teaclave Authentication Service.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_connect_frontend_service.html" title="teaclave_client_sdk::bindings::teaclave_connect_frontend_service fn">teaclave_connect_frontend_service</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Connect to Teaclave Frontend Service.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_create_task_serialized.html" title="teaclave_client_sdk::bindings::teaclave_create_task_serialized fn">teaclave_create_task_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_frontend_set_credential.html" title="teaclave_client_sdk::bindings::teaclave_frontend_set_credential fn">teaclave_frontend_set_credential</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Set user’s credential with <code>user_id</code> and <code>user_token</code>. The function returns
0 for success. On error, the function returns 1.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_get_function_serialized.html" title="teaclave_client_sdk::bindings::teaclave_get_function_serialized fn">teaclave_get_function_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_get_function_usage_stats_serialized.html" title="teaclave_client_sdk::bindings::teaclave_get_function_usage_stats_serialized fn">teaclave_get_function_usage_stats_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_get_task_result.html" title="teaclave_client_sdk::bindings::teaclave_get_task_result fn">teaclave_get_task_result</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Get task result of <code>task_id</code>. The result will be save in the <code>task_result</code>
buffer, and set corresponding <code>task_result_len</code> argument. Note that this is
a blocking function and wait for the return of the task. The function
returns 0 for success. On error, the function returns 1.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_get_task_serialized.html" title="teaclave_client_sdk::bindings::teaclave_get_task_serialized fn">teaclave_get_task_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_invoke_task.html" title="teaclave_client_sdk::bindings::teaclave_invoke_task fn">teaclave_invoke_task</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Invoke task with <code>task_id</code>. The function returns 0 for success. On error,
the function returns 1.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_invoke_task_serialized.html" title="teaclave_client_sdk::bindings::teaclave_invoke_task_serialized fn">teaclave_invoke_task_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_query_audit_logs.html" title="teaclave_client_sdk::bindings::teaclave_query_audit_logs fn">teaclave_query_audit_logs</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Query audit logs according to <code>query</code>. <code>query</code> is the query statement for tantivy. The result
will be saved in the <code>log_buffer</code> buffer with the corresponding <code>log_len</code> argument set.
Remember to free the user and message inside c_entry to avoid memory leak.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_query_audit_logs_serialized.html" title="teaclave_client_sdk::bindings::teaclave_query_audit_logs_serialized fn">teaclave_query_audit_logs_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_register_function_serialized.html" title="teaclave_client_sdk::bindings::teaclave_register_function_serialized fn">teaclave_register_function_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_register_input_file_serialized.html" title="teaclave_client_sdk::bindings::teaclave_register_input_file_serialized fn">teaclave_register_input_file_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_register_output_file_serialized.html" title="teaclave_client_sdk::bindings::teaclave_register_output_file_serialized fn">teaclave_register_output_file_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_user_login.html" title="teaclave_client_sdk::bindings::teaclave_user_login fn">teaclave_user_login</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Login a new user with <code>user_id</code> and <code>user_password</code>. The login session token
will be save in the <code>token</code> buffer, and length will be set in the
<code>token_len</code> argument. The function returns 0 for success. On error, the
function returns 1.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_user_login_serialized.html" title="teaclave_client_sdk::bindings::teaclave_user_login_serialized fn">teaclave_user_login_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_user_register.html" title="teaclave_client_sdk::bindings::teaclave_user_register fn">teaclave_user_register</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Register a new user with <code>user_id</code> and <code>user_password</code>. The function returns
0 for success. On error, the function returns 1.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.teaclave_user_register_serialized.html" title="teaclave_client_sdk::bindings::teaclave_user_register_serialized fn">teaclave_user_register_serialized</a><sup title="unsafe function"></sup></div><div class="item-right docblock-short">Send JSON serialized request to the service with the <code>client</code> and
get the serialized response.</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="teaclave_client_sdk" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>