Skip to content

Commit

Permalink
(automated) deploy from commit 354fc21
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tiny-kirin committed Nov 14, 2024
1 parent 7a81e26 commit 4a0b8e2
Show file tree
Hide file tree
Showing 477 changed files with 7,050 additions and 1,159 deletions.
4 changes: 2 additions & 2 deletions search-index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion search.desc/wiwi/wiwi-desc-0-.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion search.desc/wiwi/wiwi-desc-1-.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src-files.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 23 additions & 7 deletions src/wiwi/chain.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -646,17 +646,26 @@
<a href="#645" id="645">645</a>
<a href="#646" id="646">646</a>
<a href="#647" id="647">647</a>
<a href="#648" id="648">648</a></pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::prelude_std::<span class="kw-2">*</span>;
<a href="#648" id="648">648</a>
<a href="#649" id="649">649</a>
<a href="#650" id="650">650</a>
<a href="#651" id="651">651</a>
<a href="#652" id="652">652</a>
<a href="#653" id="653">653</a>
<a href="#654" id="654">654</a>
<a href="#655" id="655">655</a>
<a href="#656" id="656">656</a></pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::prelude_std::<span class="kw-2">*</span>;

<span class="kw">pub use </span>vec::{ vec_chain, VecChain };

<span class="kw">mod </span>vec;

<span class="kw">pub trait </span>Chain
<span class="kw">where
</span><span class="self">Self</span>: Sized + private::Sealed + Into&lt;<span class="self">Self</span>::Inner&gt; + AsRef&lt;<span class="self">Self</span>::Inner&gt; + AsMut&lt;<span class="self">Self</span>::Inner&gt;
</span><span class="self">Self</span>: Sized + private::Sealed + Into&lt;<span class="self">Self</span>::Inner&gt; + AsRef&lt;<span class="self">Self</span>::Inner&gt; + AsMut&lt;<span class="self">Self</span>::Inner&gt;,
<span class="self">Self</span>::Inner: ChainInner&lt;Chain = <span class="self">Self</span>&gt;
{
<span class="kw">type </span>Inner: ChainInner&lt;Chain = <span class="self">Self</span>&gt;;
<span class="kw">type </span>Inner;

<span class="attr">#[inline]
</span><span class="kw">fn </span>into_inner(<span class="self">self</span>) -&gt; <span class="self">Self</span>::Inner {
Expand Down Expand Up @@ -690,9 +699,10 @@

<span class="kw">pub trait </span>ChainInner
<span class="kw">where
</span><span class="self">Self</span>: Sized + private::Sealed + Into&lt;<span class="self">Self</span>::Chain&gt;
</span><span class="self">Self</span>: Sized + private::Sealed + Into&lt;<span class="self">Self</span>::Chain&gt;,
<span class="self">Self</span>::Chain: Chain&lt;Inner = <span class="self">Self</span>&gt;
{
<span class="kw">type </span>Chain: Chain&lt;Inner = <span class="self">Self</span>&gt;;
<span class="kw">type </span>Chain;

<span class="attr">#[inline]
</span><span class="kw">fn </span>into_chain(<span class="self">self</span>) -&gt; <span class="self">Self</span>::Chain {
Expand All @@ -707,7 +717,10 @@

<span class="doccomment">/// Trait implemented on chains and their inner types, allowing you to get a reference
/// to the inner type regardless of if the chain or the inner type is passed in
</span><span class="kw">pub trait </span>AsChainInner&lt;I&gt;: Sized + private::Sealed {
</span><span class="kw">pub trait </span>AsChainInner&lt;I&gt;
<span class="kw">where
</span><span class="self">Self</span>: Sized + private::Sealed
{
<span class="kw">fn </span>as_inner(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>I;
<span class="kw">fn </span>as_inner_mut(<span class="kw-2">&amp;mut </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;mut </span>I;
}
Expand All @@ -723,7 +736,10 @@
/// got initialised, and safely call [`assume_init`](MaybeUninit::assume_init).
///
/// [`store`]: OutputStorage::store
</span><span class="kw">pub unsafe trait </span>OutputStorage&lt;T&gt;: Sized + private::OutputStorageSealed&lt;T&gt; {
</span><span class="kw">pub unsafe trait </span>OutputStorage&lt;T&gt;
<span class="kw">where
</span><span class="self">Self</span>: Sized + private::OutputStorageSealed&lt;T&gt;
{
<span class="doccomment">/// # Safety
///
/// This can and should only be called once, and you must call it before returning,
Expand Down
56 changes: 41 additions & 15 deletions src/wiwi/chain/vec.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,20 @@
<a href="#564" id="564">564</a>
<a href="#565" id="565">565</a>
<a href="#566" id="566">566</a>
<a href="#567" id="567">567</a></pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::prelude_std::<span class="kw-2">*</span>;
<a href="#567" id="567">567</a>
<a href="#568" id="568">568</a>
<a href="#569" id="569">569</a>
<a href="#570" id="570">570</a>
<a href="#571" id="571">571</a>
<a href="#572" id="572">572</a>
<a href="#573" id="573">573</a>
<a href="#574" id="574">574</a>
<a href="#575" id="575">575</a>
<a href="#576" id="576">576</a>
<a href="#577" id="577">577</a>
<a href="#578" id="578">578</a>
<a href="#579" id="579">579</a>
<a href="#580" id="580">580</a></pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::prelude_std::<span class="kw-2">*</span>;
<span class="kw">use super</span>::{ chain_fn, AsChainInner, ChainInner <span class="kw">as _</span>, OutputStorage };

<span class="macro">super::decl_chain!</span> {
Expand Down Expand Up @@ -700,13 +713,15 @@
/// # Examples
///
/// TODO
</span>append[I: AsChainInner&lt;Vec&lt;T&gt;&gt;](inner, other: <span class="kw-2">&amp;mut </span>I)
=&gt; inner.append(other.as_inner_mut())
</span>append[I](inner, other: <span class="kw-2">&amp;mut </span>I) <span class="kw">where </span>{
I: AsChainInner&lt;Vec&lt;T&gt;&gt;
} =&gt; inner.append(other.as_inner_mut())
}

<span class="macro">chain_fn!</span> {
binary_search[O: OutputStorage&lt;<span class="prelude-ty">Result</span>&lt;usize, usize&gt;&gt;](inner, x: <span class="kw-2">&amp;</span>T, out: O) <span class="kw">where </span>{
T: Ord
binary_search[O](inner, x: <span class="kw-2">&amp;</span>T, out: O) <span class="kw">where </span>{
T: Ord,
O: OutputStorage&lt;<span class="prelude-ty">Result</span>&lt;usize, usize&gt;&gt;
} =&gt; {
<span class="comment">// SAFETY: we always write once to `out`
</span><span class="kw">unsafe </span>{ out.store(inner.binary_search(x)) }
Expand Down Expand Up @@ -735,9 +750,12 @@
}

<span class="macro">chain_fn!</span> {
capacity[O: OutputStorage&lt;usize&gt;](inner, out: O)
capacity[O](inner, out: O) <span class="kw">where </span>{
O: OutputStorage&lt;usize&gt;
} =&gt; {
<span class="comment">// SAFETY: we always write once to `out`
</span>=&gt; <span class="kw">unsafe </span>{ out.store(inner.capacity()) }
</span><span class="kw">unsafe </span>{ out.store(inner.capacity()) }
}
}

<span class="macro">chain_fn!</span> {
Expand All @@ -758,8 +776,9 @@
}

<span class="macro">chain_fn!</span> {
contains[O: OutputStorage&lt;bool&gt;](inner, x: <span class="kw-2">&amp;</span>T, out: O) <span class="kw">where </span>{
T: PartialEq
contains[O](inner, x: <span class="kw-2">&amp;</span>T, out: O) <span class="kw">where </span>{
T: PartialEq,
O: OutputStorage&lt;bool&gt;
} =&gt; {
<span class="comment">// SAFETY: we always write once to `out`
</span><span class="kw">unsafe </span>{ out.store(inner.contains(x)) }
Expand All @@ -786,8 +805,9 @@
}

<span class="macro">chain_fn!</span> {
ends_with[O: OutputStorage&lt;bool&gt;](inner, needle: <span class="kw-2">&amp;</span>[T], out: O) <span class="kw">where </span>{
T: PartialEq
ends_with[O](inner, needle: <span class="kw-2">&amp;</span>[T], out: O) <span class="kw">where </span>{
T: PartialEq,
O: OutputStorage&lt;bool&gt;
} =&gt; {
<span class="comment">// SAFETY: we always write once to `out`
</span><span class="kw">unsafe </span>{ out.store(inner.ends_with(needle)) }
Expand All @@ -812,9 +832,12 @@
}

<span class="macro">chain_fn!</span> {
len[O: OutputStorage&lt;usize&gt;](inner, out: O)
len[O](inner, out: O) <span class="kw">where </span>{
O: OutputStorage&lt;usize&gt;
} =&gt; {
<span class="comment">// SAFETY: we always write once to `out`
</span>=&gt; <span class="kw">unsafe </span>{ out.store(inner.len()) }
</span><span class="kw">unsafe </span>{ out.store(inner.len()) }
}
}

<span class="macro">chain_fn!</span> {
Expand All @@ -823,9 +846,12 @@
}

<span class="macro">chain_fn!</span> {
remove[O: OutputStorage&lt;T&gt;](inner, index: usize, out: O)
remove[O](inner, index: usize, out: O) <span class="kw">where </span>{
O: OutputStorage&lt;T&gt;
} =&gt; {
<span class="comment">// SAFETY: we always write once to `out`
</span>=&gt; <span class="kw">unsafe </span>{ out.store(inner.remove(index)) }
</span><span class="kw">unsafe </span>{ out.store(inner.remove(index)) }
}
}

<span class="macro">chain_fn!</span> {
Expand Down
40 changes: 27 additions & 13 deletions src/wiwi/encoding.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,21 @@
<a href="#364" id="364">364</a>
<a href="#365" id="365">365</a>
<a href="#366" id="366">366</a>
<a href="#367" id="367">367</a></pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::prelude_std::<span class="kw-2">*</span>;

<a href="#367" id="367">367</a>
<a href="#368" id="368">368</a>
<a href="#369" id="369">369</a>
<a href="#370" id="370">370</a>
<a href="#371" id="371">371</a>
<a href="#372" id="372">372</a>
<a href="#373" id="373">373</a>
<a href="#374" id="374">374</a></pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::prelude_std::<span class="kw-2">*</span>;

<span class="kw">pub use </span><span class="self">self</span>::hex::{ encode_hex, decode_hex };
<span class="kw">pub use </span><span class="self">self</span>::z85::{ encode_z85, decode_z85 };

<span class="kw">pub mod </span>base16;
<span class="kw">pub mod </span>base32;
<span class="kw">pub mod </span>base64;
<span class="kw">pub mod </span>hex;
<span class="kw">pub mod </span>z85;

Expand Down Expand Up @@ -437,24 +450,25 @@
/// This pointer is guaranteed not to move throughout the lifespan of `self`,
/// because as far as the vec itself is aware, we request it to allocate some
/// memory, it gives us at least that much, then we are not touching it, until
/// `self` gets unwrapped using [`into_full_vec`](Self::into_full_vec). After
/// that, we will never use this pointer again. We are then (unsafely) setting
/// the len of the vec to the initially requested amount of capacity, which
/// the caller of that method promises is initialised, since it is a safety
/// invariant of [`into_full_vec`]. What happens to the vec after we hand it's
/// ownership back to caller, is no longer on us to handle. The pointer has
/// been dropped, and our job is done.
/// `self` gets unwrapped using [`into_full_vec`]. After that, we will never
/// use this pointer again. We are then (unsafely) setting the len of the vec
/// to the initially requested amount of capacity, which the caller of that
/// method promises is initialised, since it is a safety invariant of
/// [`into_full_vec`]. What happens to the vec after we hand it's ownership
/// back to caller, is no longer on us to handle. The pointer has been dropped,
/// and our job is done.
///
/// [`into_full_vec`]: Self::into_full_vec
</span>ptr: <span class="kw-2">*mut </span>u8,
<span class="doccomment">/// The amount of capacity that the caller initially requested
///
/// # Safety
///
/// Previously, in the unwrapping operation, we used the value returned by
/// [`Vec::capacity`] to set the len of the vec. This is unsound, since
/// [`Vec::with_capacity`] is allowed to over allocate (but not under, so
/// we're safe there). Because of this fact, we must store the initial
/// requested capacity (that the caller promises to fill before taking the vec),
/// and use that value to set the len instead.
/// [`Vec::with_capacity`] is allowed to over allocate. Because of this, we
/// must store the initial requested capacity (that the caller promises to
/// fill before taking the vec), and use that value to set the len instead.
</span>requested_capacity: usize,
<span class="doccomment">/// In debug mode, tracks the amount of bytes written, and uses it to perform
/// assertions on preconditions. In release mode, this is not present
Expand Down
1 change: 1 addition & 0 deletions src/wiwi/encoding/base16.rs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!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="Source of the Rust file `src/encoding/base16.rs`."><title>base16.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-590a400c.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="wiwi" data-themes="meadow" data-resource-suffix="" data-rustdoc-version="1.84.0-nightly (b3f75cc87 2024-11-02)" data-channel="nightly" data-search-js="search-c5a66128.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="../../../static.files/src-script-56102188.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer"></div><main><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">wiwi/encoding/</div>base16.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"></pre></div><pre class="rust"><code></code></pre></div></section></main></body></html>
1 change: 1 addition & 0 deletions src/wiwi/encoding/base32.rs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!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="Source of the Rust file `src/encoding/base32.rs`."><title>base32.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-590a400c.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="wiwi" data-themes="meadow" data-resource-suffix="" data-rustdoc-version="1.84.0-nightly (b3f75cc87 2024-11-02)" data-channel="nightly" data-search-js="search-c5a66128.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="../../../static.files/src-script-56102188.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer"></div><main><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">wiwi/encoding/</div>base32.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"></pre></div><pre class="rust"><code></code></pre></div></section></main></body></html>
1 change: 1 addition & 0 deletions src/wiwi/encoding/base64.rs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!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="Source of the Rust file `src/encoding/base64.rs`."><title>base64.rs - source</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.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" crossorigin href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-590a400c.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="wiwi" data-themes="meadow" data-resource-suffix="" data-rustdoc-version="1.84.0-nightly (b3f75cc87 2024-11-02)" data-channel="nightly" data-search-js="search-c5a66128.js" data-settings-js="settings-0f613d39.js" ><script src="../../../static.files/storage-59e33391.js"></script><script defer src="../../../static.files/src-script-56102188.js"></script><script defer src="../../../src-files.js"></script><script defer src="../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc src"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="src-sidebar-title"><h2>Files</h2></div></nav><div class="sidebar-resizer"></div><main><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1><div class="sub-heading">wiwi/encoding/</div>base64.rs</h1><rustdoc-toolbar></rustdoc-toolbar></div><div class="example-wrap"><div data-nosnippet><pre class="src-line-numbers"></pre></div><pre class="rust"><code></code></pre></div></section></main></body></html>
Loading

0 comments on commit 4a0b8e2

Please sign in to comment.