blob: 28bcfd647e9c829b27841af1f184dc15da8b7b67 [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="Login a new user with `user_id` and `user_password`. The login session token will be save in the `token` buffer, and length will be set in the `token_len` argument. The function returns 0 for success. On error, the function returns 1."><meta name="keywords" content="rust, rustlang, rust-lang, teaclave_user_login"><title>teaclave_user_login in 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="sidebar-items.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 fn"><!--[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><div class="sidebar-elems"><h2><a href="index.html">In teaclave_client_sdk::bindings</a></h2></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">Function <a href="../index.html">teaclave_client_sdk</a>::<wbr><a href="index.html">bindings</a>::<wbr><a class="fn" href="#">teaclave_user_login</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#157-188">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="item-decl"><pre class="rust fn"><code>#[no_mangle]
pub unsafe extern &quot;C&quot; fn teaclave_user_login(<br>&nbsp;&nbsp;&nbsp;&nbsp;client: &amp;mut <a class="struct" href="../struct.AuthenticationClient.html" title="struct teaclave_client_sdk::AuthenticationClient">AuthenticationClient</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;user_id: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a>c_char,<br>&nbsp;&nbsp;&nbsp;&nbsp;user_password: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a>c_char,<br>&nbsp;&nbsp;&nbsp;&nbsp;token: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a>c_char,<br>&nbsp;&nbsp;&nbsp;&nbsp;token_len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a>size_t<br>) -&gt; c_int</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>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.</p>
<h2 id="safety"><a href="#safety">Safety</a></h2>
<p><code>user_id</code>, <code>user_password</code> should be C string (null terminated), token and token_len should be consistent.</p>
</div></details></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>