Deploying to gh-pages from @ GreptimeTeam/greptimedb@fcb77fd025 🚀

This commit is contained in:
github-merge-queue[bot]
2026-05-15 04:01:35 +00:00
commit 290e830bf8
21724 changed files with 2574090 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<!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="`SecretBox` wrapper type for more carefully handling secret values (e.g. passwords, cryptographic keys, access tokens or other credentials)"><title>common_base::secrets - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_base" data-themes="" data-resource-suffix="" data-rustdoc-version="1.96.0-nightly (ac7f9ec7d 2026-03-20)" data-channel="nightly" data-search-js="search-63369b7b.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5013f961.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module secrets</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_base/index.html">common_<wbr>base</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module secrets</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#goals" title="Goals">Goals</a></li><li><a href="#serde-support" title="`serde` support"><code>serde</code> support</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate common_<wbr>base</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_base</a></div><h1>Module <span>secrets</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_base/secrets.rs.html#3-234">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><a href="struct.SecretBox.html" title="struct common_base::secrets::SecretBox"><code>SecretBox</code></a> wrapper type for more carefully handling secret values
(e.g. passwords, cryptographic keys, access tokens or other credentials)</p>
<h2 id="goals"><a class="doc-anchor" href="#goals">§</a>Goals</h2>
<ul>
<li>Make secret access explicit and easy-to-audit via the
<a href="trait.ExposeSecret.html" title="trait common_base::secrets::ExposeSecret"><code>ExposeSecret</code></a> and <a href="trait.ExposeSecretMut.html" title="trait common_base::secrets::ExposeSecretMut"><code>ExposeSecretMut</code></a> traits.</li>
<li>Prevent accidental leakage of secrets via channels like debug logging</li>
<li>Ensure secrets are wiped from memory on drop securely
(using the [<code>zeroize</code>] crate)</li>
</ul>
<p>Presently this crate favors a simple, <code>no_std</code>-friendly, safe i.e.
<code>forbid(unsafe_code)</code>-based implementation and does not provide more advanced
memory protection mechanisms e.g. ones based on <code>mlock(2)</code>/<code>mprotect(2)</code>.
We may explore more advanced protection mechanisms in the future.
Those who dont mind <code>std</code> and <code>libc</code> dependencies should consider using
the <a href="https://crates.io/crates/secrets"><code>secrets</code></a> crate.</p>
<h2 id="serde-support"><a class="doc-anchor" href="#serde-support">§</a><code>serde</code> support</h2>
<p>When the <code>serde</code> feature of this crate is enabled, the <a href="struct.SecretBox.html" title="struct common_base::secrets::SecretBox"><code>SecretBox</code></a> type will
receive a <a href="https://docs.rs/serde_core/1.0.228/serde_core/de/trait.Deserialize.html" title="trait serde_core::de::Deserialize"><code>Deserialize</code></a> impl for all <code>SecretBox&lt;T&gt;</code> types where
<code>T: DeserializeOwned</code>. This allows <em>loading</em> secret values from data
deserialized from <code>serde</code> (be careful to clean up any intermediate secrets
when doing this, e.g. the unparsed input!)</p>
<p>To prevent exfiltration of secret values via <code>serde</code>, by default <code>SecretBox&lt;T&gt;</code>
does <em>not</em> receive a corresponding <a href="https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serialize.html" title="trait serde_core::ser::Serialize"><code>Serialize</code></a> impl. If you would like
types of <code>SecretBox&lt;T&gt;</code> to be serializable with <code>serde</code>, you will need to impl
the <a href="trait.SerializableSecret.html" title="trait common_base::secrets::SerializableSecret"><code>SerializableSecret</code></a> marker trait on <code>T</code></p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.SecretBox.html" title="struct common_base::secrets::SecretBox">Secret<wbr>Box</a></dt><dd>Wrapper type for values that contains secrets.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.ExposeSecret.html" title="trait common_base::secrets::ExposeSecret">Expose<wbr>Secret</a></dt><dd>Expose a reference to an inner secret</dd><dt><a class="trait" href="trait.ExposeSecretMut.html" title="trait common_base::secrets::ExposeSecretMut">Expose<wbr>Secret<wbr>Mut</a></dt><dd>Expose a mutable reference to an inner secret</dd><dt><a class="trait" href="trait.SerializableSecret.html" title="trait common_base::secrets::SerializableSecret">Serializable<wbr>Secret</a></dt><dd>Marker trait for secret types which can be <a href="https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serialize.html" title="trait serde_core::ser::Serialize"><code>Serialize</code></a>-d by <a href="https://docs.rs/serde/1.0.228/serde/index.html" title="mod serde"><code>serde</code></a>.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.SecretString.html" title="type common_base::secrets::SecretString">Secret<wbr>String</a></dt><dd>Wrapper type for strings that contains secrets. See also <a href="struct.SecretBox.html" title="struct common_base::secrets::SecretBox">SecretBox</a>.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["SecretBox"],"trait":["ExposeSecret","ExposeSecretMut","SerializableSecret"],"type":["SecretString"]};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
<!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="Expose a reference to an inner secret"><title>ExposeSecret in common_base::secrets - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_base" data-themes="" data-resource-suffix="" data-rustdoc-version="1.96.0-nightly (ac7f9ec7d 2026-03-20)" data-channel="nightly" data-search-js="search-63369b7b.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5013f961.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">ExposeSecret</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_base/index.html">common_<wbr>base</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Expose<wbr>Secret</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.expose_secret" title="expose_secret">expose_secret</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>base::<wbr>secrets</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_base</a>::<wbr><a href="index.html">secrets</a></div><h1>Trait <span class="trait">Expose<wbr>Secret</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_base/secrets.rs.html#184-187">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ExposeSecret&lt;S&gt; {
// Required method
fn <a href="#tymethod.expose_secret" class="fn">expose_secret</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;S</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Expose a reference to an inner secret</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.expose_secret" class="method"><a class="src rightside" href="../../src/common_base/secrets.rs.html#186">Source</a><h4 class="code-header">fn <a href="#tymethod.expose_secret" class="fn">expose_secret</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;S</a></h4></section></summary><div class="docblock"><p>Expose secret: this is the only method providing access to a secret.</p>
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><div class="negative-marker"></div><section id="impl-ExposeSecret%3CS%3E-for-SecretBox%3CS%3E" class="impl"><a class="src rightside" href="../../src/common_base/secrets.rs.html#162-166">Source</a><a href="#impl-ExposeSecret%3CS%3E-for-SecretBox%3CS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S: Zeroize&gt; <a class="trait" href="trait.ExposeSecret.html" title="trait common_base::secrets::ExposeSecret">ExposeSecret</a>&lt;S&gt; for <a class="struct" href="struct.SecretBox.html" title="struct common_base::secrets::SecretBox">SecretBox</a>&lt;S&gt;</h3></section></div><script src="../../trait.impl/common_base/secrets/trait.ExposeSecret.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,6 @@
<!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="Expose a mutable reference to an inner secret"><title>ExposeSecretMut in common_base::secrets - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_base" data-themes="" data-resource-suffix="" data-rustdoc-version="1.96.0-nightly (ac7f9ec7d 2026-03-20)" data-channel="nightly" data-search-js="search-63369b7b.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5013f961.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">ExposeSecretMut</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_base/index.html">common_<wbr>base</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Expose<wbr>Secret<wbr>Mut</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.expose_secret_mut" title="expose_secret_mut">expose_secret_mut</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>base::<wbr>secrets</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_base</a>::<wbr><a href="index.html">secrets</a></div><h1>Trait <span class="trait">Expose<wbr>Secret<wbr>Mut</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_base/secrets.rs.html#190-193">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ExposeSecretMut&lt;S&gt; {
// Required method
fn <a href="#tymethod.expose_secret_mut" class="fn">expose_secret_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut S</a>;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Expose a mutable reference to an inner secret</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.expose_secret_mut" class="method"><a class="src rightside" href="../../src/common_base/secrets.rs.html#192">Source</a><h4 class="code-header">fn <a href="#tymethod.expose_secret_mut" class="fn">expose_secret_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut S</a></h4></section></summary><div class="docblock"><p>Expose secret: this is the only method providing access to a secret.</p>
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><div class="negative-marker"></div><section id="impl-ExposeSecretMut%3CS%3E-for-SecretBox%3CS%3E" class="impl"><a class="src rightside" href="../../src/common_base/secrets.rs.html#168-172">Source</a><a href="#impl-ExposeSecretMut%3CS%3E-for-SecretBox%3CS%3E" class="anchor">§</a><h3 class="code-header">impl&lt;S: Zeroize&gt; <a class="trait" href="trait.ExposeSecretMut.html" title="trait common_base::secrets::ExposeSecretMut">ExposeSecretMut</a>&lt;S&gt; for <a class="struct" href="struct.SecretBox.html" title="struct common_base::secrets::SecretBox">SecretBox</a>&lt;S&gt;</h3></section></div><script src="../../trait.impl/common_base/secrets/trait.ExposeSecretMut.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,10 @@
<!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="Marker trait for secret types which can be `Serialize`-d by `serde`."><title>SerializableSecret in common_base::secrets - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_base" data-themes="" data-resource-suffix="" data-rustdoc-version="1.96.0-nightly (ac7f9ec7d 2026-03-20)" data-channel="nightly" data-search-js="search-63369b7b.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5013f961.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">SerializableSecret</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_base/index.html">common_<wbr>base</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Serializable<wbr>Secret</a></h2><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>base::<wbr>secrets</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_base</a>::<wbr><a href="index.html">secrets</a></div><h1>Trait <span class="trait">Serializable<wbr>Secret</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_base/secrets.rs.html#210">Source</a> </span></div><pre class="rust item-decl"><code>pub trait SerializableSecret: <a class="trait" href="https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serialize.html" title="trait serde_core::ser::Serialize">Serialize</a> { }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Marker trait for secret types which can be <a href="https://docs.rs/serde_core/1.0.228/serde_core/ser/trait.Serialize.html" title="trait serde_core::ser::Serialize"><code>Serialize</code></a>-d by <a href="https://docs.rs/serde/1.0.228/serde/index.html" title="mod serde"><code>serde</code></a>.</p>
<p>When the <code>serde</code> feature of this crate is enabled and types are marked with
this trait, they receive a <a href="https://docs.rs/secrecy/latest/secrecy/struct.Secret.html#implementations"><code>Serialize</code> impl</a> for <code>SecretBox&lt;T&gt;</code>.
(NOTE: all types which impl <code>DeserializeOwned</code> receive a <a href="https://docs.rs/serde_core/1.0.228/serde_core/de/trait.Deserialize.html" title="trait serde_core::de::Deserialize"><code>Deserialize</code></a>
impl)</p>
<p>This is done deliberately to prevent accidental exfiltration of secrets
via <code>serde</code> serialization.</p>
<p>If you really want to have <code>serde</code> serialize those types, use the
<a href="https://serde.rs/field-attrs.html#serialize_with"><code>serialize_with</code></a> attribute to specify a serializer that exposes the secret.</p>
</div></details><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/common_base/secrets/trait.SerializableSecret.js" async></script></section></div></main></body></html>

View File

@@ -0,0 +1,4 @@
<!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="Wrapper type for strings that contains secrets. See also SecretBox."><title>SecretString in common_base::secrets - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="common_base" data-themes="" data-resource-suffix="" data-rustdoc-version="1.96.0-nightly (ac7f9ec7d 2026-03-20)" data-channel="nightly" data-search-js="search-63369b7b.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5013f961.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">SecretString</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../common_base/index.html">common_<wbr>base</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Secret<wbr>String</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3><h3><a href="#fields">Fields</a></h3><ul class="block field"><li><a href="#structfield.inner_secret" title="inner_secret">inner_secret</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Display-for-SecretBox%3CString%3E" title="Display">Display</a></li><li><a href="#impl-From%3CString%3E-for-SecretBox%3CString%3E" title="From&#60;String&#62;">From&#60;String&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In common_<wbr>base::<wbr>secrets</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">common_base</a>::<wbr><a href="index.html">secrets</a></div><h1>Type Alias <span class="type">Secret<wbr>String</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/common_base/secrets.rs.html#41">Source</a> </span></div><pre class="rust item-decl"><code>pub type SecretString = <a class="struct" href="struct.SecretBox.html" title="struct common_base::secrets::SecretBox">SecretBox</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Wrapper type for strings that contains secrets. See also <a href="struct.SecretBox.html" title="struct common_base::secrets::SecretBox">SecretBox</a>.</p>
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct SecretString {
inner_secret: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
}</code></pre><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield.inner_secret" class="structfield section-header"><a href="#structfield.inner_secret" class="anchor field">§</a><code>inner_secret: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</code></span><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Display-for-SecretBox%3CString%3E" class="impl"><a class="src rightside" href="../../src/common_base/secrets.rs.html#49-53">Source</a><a href="#impl-Display-for-SecretBox%3CString%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="type" href="type.SecretString.html" title="type common_base::secrets::SecretString">SecretString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/common_base/secrets.rs.html#50-52">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CString%3E-for-SecretBox%3CString%3E" class="impl"><a class="src rightside" href="../../src/common_base/secrets.rs.html#43-47">Source</a><a href="#impl-From%3CString%3E-for-SecretBox%3CString%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt; for <a class="type" href="type.SecretString.html" title="type common_base::secrets::SecretString">SecretString</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/common_base/secrets.rs.html#44-46">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(value: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -&gt; Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details></div><script src="../../type.impl/common_base/secrets/struct.SecretBox.js" data-self-path="common_base::secrets::SecretString" async></script></section></div></main></body></html>