Adding large folders

This commit is contained in:
2026-02-26 12:00:21 -05:00
parent 5400d82acd
commit 49701c85ad
47332 changed files with 1942573 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/ule/struct.CharULE.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/ule/struct.CharULE.html">../../../zerovec/ule/struct.CharULE.html</a>...</p>
<script>location.replace("../../../zerovec/ule/struct.CharULE.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,125 @@
<!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="Documentation on implementing custom VarULE types."><title>zerovec::ule::custom - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="zerovec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.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"><!--[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 custom</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../zerovec/index.html">zerovec</a><span class="version">0.11.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module custom</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In zerovec::<wbr>ule</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">zerovec</a>::<wbr><a href="../index.html">ule</a></div><h1>Module <span>custom</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/zerovec/ule/custom.rs.html#5-145">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Documentation on implementing custom VarULE types.</p>
<p>This module contains documentation for defining custom VarULE types,
especially those using complex custom dynamically sized types.</p>
<p>In <em>most cases</em> you should be able to create custom VarULE types using
<a href="../../attr.make_ule.html" title="attr zerovec::make_ule"><code>#[make_varule]</code></a>.</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
<p>For example, if your regular stack type is:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerofrom::ZeroFrom;
<span class="kw">use </span>zerovec::ule::<span class="kw-2">*</span>;
<span class="kw">use </span>zerovec::ZeroVec;
<span class="attr">#[derive(serde::Serialize, serde::Deserialize)]
</span><span class="kw">struct </span>Foo&lt;<span class="lifetime">'a</span>&gt; {
field1: char,
field2: u32,
<span class="attr">#[serde(borrow)]
</span>field3: ZeroVec&lt;<span class="lifetime">'a</span>, u32&gt;,
}</code></pre></div>
<p>then the ULE type will be implemented as follows. Ideally, you should have
<code>EncodeAsVarULE</code> and <code>ZeroFrom</code> implementations on <code>Foo</code> pertaining to <code>FooULE</code>,
as well as a <code>Serialize</code> impl on <code>FooULE</code> and a <code>Deserialize</code> impl on <code>Box&lt;FooULE&gt;</code>
to enable human-readable serialization and deserialization.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerovec::{ZeroVec, VarZeroVec, ZeroSlice};
<span class="kw">use </span>zerovec::ule::<span class="kw-2">*</span>;
<span class="kw">use </span>zerofrom::ZeroFrom;
<span class="kw">use </span>core::mem;
<span class="comment">// Must be repr(C, packed) for safety of VarULE!
// Must also only contain ULE types
</span><span class="attr">#[repr(C, packed)]
</span><span class="kw">struct </span>FooULE {
field1: &lt;char <span class="kw">as </span>AsULE&gt;::ULE,
field2: &lt;u32 <span class="kw">as </span>AsULE&gt;::ULE,
field3: ZeroSlice&lt;u32&gt;,
}
<span class="comment">// Safety (based on the safety checklist on the VarULE trait):
// 1. FooULE does not include any uninitialized or padding bytes. (achieved by `#[repr(C, packed)]` on
// a struct with only ULE fields)
// 2. FooULE is aligned to 1 byte. (achieved by `#[repr(C, packed)]` on
// a struct with only ULE fields)
// 3. The impl of `validate_bytes()` returns an error if any byte is not valid.
// 4. The impl of `validate_bytes()` returns an error if the slice cannot be used in its entirety
// 5. The impl of `from_bytes_unchecked()` returns a reference to the same data.
// 6. The other VarULE methods use the default impl.
// 7. FooULE byte equality is semantic equality
</span><span class="kw">unsafe impl </span>VarULE <span class="kw">for </span>FooULE {
<span class="kw">fn </span>validate_bytes(bytes: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Result</span>&lt;(), UleError&gt; {
<span class="comment">// validate each field
</span>&lt;char <span class="kw">as </span>AsULE&gt;::ULE::validate_bytes(<span class="kw-2">&amp;</span>bytes[<span class="number">0</span>..<span class="number">3</span>]).map_err(|<span class="kw">_</span>| UleError::parse::&lt;<span class="self">Self</span>&gt;())<span class="question-mark">?</span>;
&lt;u32 <span class="kw">as </span>AsULE&gt;::ULE::validate_bytes(<span class="kw-2">&amp;</span>bytes[<span class="number">3</span>..<span class="number">7</span>]).map_err(|<span class="kw">_</span>| UleError::parse::&lt;<span class="self">Self</span>&gt;())<span class="question-mark">?</span>;
<span class="kw">let _ </span>= ZeroVec::&lt;u32&gt;::parse_bytes(<span class="kw-2">&amp;</span>bytes[<span class="number">7</span>..]).map_err(|<span class="kw">_</span>| UleError::parse::&lt;<span class="self">Self</span>&gt;())<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(())
}
<span class="kw">unsafe fn </span>from_bytes_unchecked(bytes: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="kw-2">&amp;</span><span class="self">Self </span>{
<span class="kw">let </span>ptr = bytes.as_ptr();
<span class="kw">let </span>len = bytes.len();
<span class="comment">// subtract the length of the char and u32 to get the length of the array
</span><span class="kw">let </span>len_new = (len - <span class="number">7</span>) / <span class="number">4</span>;
<span class="comment">// it's hard constructing custom DSTs, we fake a pointer/length construction
// eventually we can use the Pointer::Metadata APIs when they stabilize
</span><span class="kw">let </span>fake_slice = core::ptr::slice_from_raw_parts(ptr <span class="kw">as </span><span class="kw-2">*const </span>&lt;u32 <span class="kw">as </span>AsULE&gt;::ULE, len_new);
<span class="kw-2">&amp;*</span>(fake_slice <span class="kw">as </span><span class="kw-2">*const </span><span class="self">Self</span>)
}
}
<span class="kw">unsafe impl </span>EncodeAsVarULE&lt;FooULE&gt; <span class="kw">for </span>Foo&lt;<span class="lifetime">'_</span>&gt; {
<span class="kw">fn </span>encode_var_ule_as_slices&lt;R&gt;(<span class="kw-2">&amp;</span><span class="self">self</span>, cb: <span class="kw">impl </span>FnOnce(<span class="kw-2">&amp;</span>[<span class="kw-2">&amp;</span>[u8]]) -&gt; R) -&gt; R {
<span class="comment">// take each field, convert to ULE byte slices, and pass them through
</span>cb(<span class="kw-2">&amp;</span>[&lt;char <span class="kw">as </span>AsULE&gt;::ULE::slice_as_bytes(<span class="kw-2">&amp;</span>[<span class="self">self</span>.field1.to_unaligned()]),
&lt;u32 <span class="kw">as </span>AsULE&gt;::ULE::slice_as_bytes(<span class="kw-2">&amp;</span>[<span class="self">self</span>.field2.to_unaligned()]),
<span class="comment">// the ZeroVec is already in the correct slice format
</span><span class="self">self</span>.field3.as_bytes()])
}
}
<span class="kw">impl</span>&lt;<span class="lifetime">'a</span>&gt; ZeroFrom&lt;<span class="lifetime">'a</span>, FooULE&gt; <span class="kw">for </span>Foo&lt;<span class="lifetime">'a</span>&gt; {
<span class="kw">fn </span>zero_from(other: <span class="kw-2">&amp;</span><span class="lifetime">'a </span>FooULE) -&gt; <span class="self">Self </span>{
<span class="self">Self </span>{
field1: AsULE::from_unaligned(other.field1),
field2: AsULE::from_unaligned(other.field2),
field3: ZeroFrom::zero_from(<span class="kw-2">&amp;</span>other.field3),
}
}
}
<span class="kw">impl </span>serde::Serialize <span class="kw">for </span>FooULE
{
<span class="kw">fn </span>serialize&lt;S&gt;(<span class="kw-2">&amp;</span><span class="self">self</span>, serializer: S) -&gt; <span class="prelude-ty">Result</span>&lt;S::Ok, S::Error&gt;
<span class="kw">where
</span>S: serde::Serializer,
{
Foo::zero_from(<span class="self">self</span>).serialize(serializer)
}
}
<span class="kw">impl</span>&lt;<span class="lifetime">'de</span>&gt; serde::Deserialize&lt;<span class="lifetime">'de</span>&gt; <span class="kw">for </span>Box&lt;FooULE&gt;
{
<span class="kw">fn </span>deserialize&lt;D&gt;(deserializer: D) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>, D::Error&gt;
<span class="kw">where
</span>D: serde::Deserializer&lt;<span class="lifetime">'de</span>&gt;,
{
<span class="kw">let </span><span class="kw-2">mut </span>foo = Foo::deserialize(deserializer)<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(encode_varule_to_box(<span class="kw-2">&amp;</span>foo))
}
}
<span class="kw">fn </span>main() {
<span class="kw">let </span><span class="kw-2">mut </span>foos = [Foo {field1: <span class="string">'u'</span>, field2: <span class="number">983</span>, field3: ZeroVec::alloc_from_slice(<span class="kw-2">&amp;</span>[<span class="number">1212</span>,<span class="number">2309</span>,<span class="number">500</span>,<span class="number">7000</span>])},
Foo {field1: <span class="string">'l'</span>, field2: <span class="number">1010</span>, field3: ZeroVec::alloc_from_slice(<span class="kw-2">&amp;</span>[<span class="number">1932</span>, <span class="number">0</span>, <span class="number">8888</span>, <span class="number">91237</span>])}];
<span class="kw">let </span>vzv = VarZeroVec::&lt;<span class="kw">_</span>&gt;::from(<span class="kw-2">&amp;</span>foos);
<span class="macro">assert_eq!</span>(char::from_unaligned(vzv.get(<span class="number">0</span>).unwrap().field1), <span class="string">'u'</span>);
<span class="macro">assert_eq!</span>(u32::from_unaligned(vzv.get(<span class="number">0</span>).unwrap().field2), <span class="number">983</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>vzv.get(<span class="number">0</span>).unwrap().field3, <span class="kw-2">&amp;</span>[<span class="number">1212</span>,<span class="number">2309</span>,<span class="number">500</span>,<span class="number">7000</span>][..]);
<span class="macro">assert_eq!</span>(char::from_unaligned(vzv.get(<span class="number">1</span>).unwrap().field1), <span class="string">'l'</span>);
<span class="macro">assert_eq!</span>(u32::from_unaligned(vzv.get(<span class="number">1</span>).unwrap().field2), <span class="number">1010</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>vzv.get(<span class="number">1</span>).unwrap().field3, <span class="kw-2">&amp;</span>[<span class="number">1932</span>, <span class="number">0</span>, <span class="number">8888</span>, <span class="number">91237</span>][..]);
}</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {};

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="Custom derive for [`ULE`]."><title>ULE in zerovec::ule - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="zerovec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.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 derive"><!--[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="#">ULE</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../zerovec/index.html">zerovec</a><span class="version">0.11.5</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In zerovec::<wbr>ule</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">zerovec</a>::<wbr><a href="index.html">ule</a></div><h1>Derive Macro <span class="derive">ULE</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/zerovec_derive/lib.rs.html#17">Source</a> </span></div><pre class="rust item-decl"><code>#[derive(ULE)]</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Custom derive for <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a>.</p>
<p>This can be attached to <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Copy.html" title="trait core::marker::Copy"><code>Copy</code></a> structs containing only <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> types.</p>
<p>Most of the time, it is recommended one use <a href="../attr.make_ule.html" title="attr zerovec::make_ule"><code>#[make_ule]</code></a> instead of defining
a custom ULE type.
Full docs for this proc macro can be found on the <a href="https://docs.rs/zerovec"><code>zerovec</code></a> crate.</p>
</div></details></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="Custom derive for [`VarULE`]"><title>VarULE in zerovec::ule - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="zerovec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.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 derive"><!--[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="#">VarULE</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../zerovec/index.html">zerovec</a><span class="version">0.11.5</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In zerovec::<wbr>ule</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">zerovec</a>::<wbr><a href="index.html">ule</a></div><h1>Derive Macro <span class="derive">VarULE</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/zerovec_derive/lib.rs.html#24">Source</a> </span></div><pre class="rust item-decl"><code>#[derive(VarULE)]</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Custom derive for <a href="trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a></p>
<p>This can be attached to structs containing only <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> types with one <a href="trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> type at the end.</p>
<p>Most of the time, it is recommended one use <a href="../attr.make_varule.html" title="attr zerovec::make_varule"><code>#[make_varule]</code></a> instead of defining
a custom <a href="trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> type.
Full docs for this proc macro can be found on the <a href="https://docs.rs/zerovec"><code>zerovec</code></a> crate.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/ule/trait.EncodeAsVarULE.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/ule/trait.EncodeAsVarULE.html">../../../zerovec/ule/trait.EncodeAsVarULE.html</a>...</p>
<script>location.replace("../../../zerovec/ule/trait.EncodeAsVarULE.html" + location.search + location.hash);</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
<!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="Traits over unaligned little-endian data (ULE, pronounced “yule”)."><title>zerovec::ule - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="zerovec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.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"><!--[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 ule</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../zerovec/index.html">zerovec</a><span class="version">0.11.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module ule</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#unions" title="Unions">Unions</a></li><li><a href="#derives" title="Derive Macros">Derive Macros</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate zerovec</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">zerovec</a></div><h1>Module <span>ule</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/zerovec/ule/mod.rs.html#5-452">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Traits over unaligned little-endian data (ULE, pronounced “yule”).</p>
<p>The main traits for this module are <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a>, <a href="trait.AsULE.html" title="trait zerovec::ule::AsULE"><code>AsULE</code></a> and, <a href="trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a>.</p>
<p>See <a href="https://github.com/unicode-org/icu4x/blob/main/utils/zerovec/design_doc.md">the design doc</a> for details on how these traits
works under the hood.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="custom/index.html" title="mod zerovec::ule::custom">custom</a></dt><dd>Documentation on implementing custom VarULE types.</dd><dt><a class="mod" href="tuple/index.html" title="mod zerovec::ule::tuple">tuple</a></dt><dd>ULE impls for tuples.</dd><dt><a class="mod" href="tuplevar/index.html" title="mod zerovec::ule::tuplevar">tuplevar</a></dt><dd><a href="trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> impls for tuples.</dd><dt><a class="mod" href="vartuple/index.html" title="mod zerovec::ule::vartuple">vartuple</a></dt><dd>Types to help compose fixed-size <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> and variable-size <a href="trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> primitives.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.CharULE.html" title="struct zerovec::ule::CharULE">CharULE</a></dt><dd>A u8 array of little-endian data corresponding to a Unicode scalar value.</dd><dt><a class="struct" href="struct.MultiFieldsULE.html" title="struct zerovec::ule::MultiFieldsULE">Multi<wbr>FieldsULE</a></dt><dd>This type is used by the custom derive to represent multiple <a href="trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a>
fields packed into a single end-of-struct field. It is not recommended
to use this type directly, use <a href="tuplevar/struct.Tuple2VarULE.html" title="struct zerovec::ule::tuplevar::Tuple2VarULE"><code>Tuple2VarULE</code></a> etc instead.</dd><dt><a class="struct" href="struct.NichedOption.html" title="struct zerovec::ule::NichedOption">Niched<wbr>Option</a></dt><dd>Optional type which uses <a href="union.NichedOptionULE.html" title="union zerovec::ule::NichedOptionULE"><code>NichedOptionULE&lt;U,N&gt;</code></a> as ULE type.</dd><dt><a class="struct" href="struct.OptionULE.html" title="struct zerovec::ule::OptionULE">OptionULE</a></dt><dd>This type is the <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> type for <code>Option&lt;U&gt;</code> where <code>U</code> is a <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> type</dd><dt><a class="struct" href="struct.OptionVarULE.html" title="struct zerovec::ule::OptionVarULE">Option<wbr>VarULE</a></dt><dd>A type allowing one to represent <code>Option&lt;U&gt;</code> for <a href="trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> <code>U</code> types.</dd><dt><a class="struct" href="struct.RawBytesULE.html" title="struct zerovec::ule::RawBytesULE">RawBytesULE</a></dt><dd>A u8 array of little-endian data with infallible conversions to and from &amp;<a href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html" title="primitive u8">u8</a>.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.UleError.html" title="enum zerovec::ule::UleError">UleError</a></dt><dd>An error type to be used for decoding slices of ULE types</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.AsULE.html" title="trait zerovec::ule::AsULE">AsULE</a></dt><dd>A trait for any type that has a 1:1 mapping with an unaligned little-endian (ULE) type.</dd><dt><a class="trait" href="trait.EncodeAsVarULE.html" title="trait zerovec::ule::EncodeAsVarULE">Encode<wbr>AsVarULE</a></dt><dd>Allows types to be encoded as VarULEs. This is highly useful for implementing VarULE on
custom DSTs where the type cannot be obtained as a reference to some other type.</dd><dt><a class="trait" href="trait.EqULE.html" title="trait zerovec::ule::EqULE">EqULE</a></dt><dd>A type whose byte sequence equals the byte sequence of its ULE type on
little-endian platforms.</dd><dt><a class="trait" href="trait.NicheBytes.html" title="trait zerovec::ule::NicheBytes">Niche<wbr>Bytes</a></dt><dd>The <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> types implementing this trait guarantee that <a href="trait.NicheBytes.html#associatedconstant.NICHE_BIT_PATTERN" title="associated constant zerovec::ule::NicheBytes::NICHE_BIT_PATTERN"><code>NicheBytes::NICHE_BIT_PATTERN</code></a>
can never occur as a valid byte representation of the type.</dd><dt><a class="trait" href="trait.SliceAsULE.html" title="trait zerovec::ule::SliceAsULE">Slice<wbr>AsULE</a></dt><dd>A trait for a type where aligned slices can be cast to unaligned slices.</dd><dt><a class="trait" href="trait.ULE.html" title="trait zerovec::ule::ULE">ULE</a></dt><dd>Fixed-width, byte-aligned data that can be cast to and from a little-endian byte slice.</dd><dt><a class="trait" href="trait.VarULE.html" title="trait zerovec::ule::VarULE">VarULE</a></dt><dd>Variable-width, byte-aligned data that can be cast to and from a little-endian byte slice.</dd></dl><h2 id="unions" class="section-header">Unions<a href="#unions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="union" href="union.NichedOptionULE.html" title="union zerovec::ule::NichedOptionULE">Niched<wbr>OptionULE</a></dt><dd><a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> type for <a href="struct.NichedOption.html" title="struct zerovec::ule::NichedOption"><code>NichedOption&lt;U,N&gt;</code></a> where U implements <a href="trait.NicheBytes.html" title="trait zerovec::ule::NicheBytes"><code>NicheBytes</code></a>.
The invalid bit pattern is used as the niche.</dd></dl><h2 id="derives" class="section-header">Derive Macros<a href="#derives" class="anchor">§</a></h2><dl class="item-table"><dt><a class="derive" href="derive.ULE.html" title="derive zerovec::ule::ULE">ULE</a></dt><dd>Custom derive for <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a>.</dd><dt><a class="derive" href="derive.VarULE.html" title="derive zerovec::ule::VarULE">VarULE</a></dt><dd>Custom derive for <a href="trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a></dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/ule/struct.MultiFieldsULE.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/ule/struct.MultiFieldsULE.html">../../../zerovec/ule/struct.MultiFieldsULE.html</a>...</p>
<script>location.replace("../../../zerovec/ule/struct.MultiFieldsULE.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/ule/struct.NichedOption.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/ule/struct.NichedOption.html">../../../zerovec/ule/struct.NichedOption.html</a>...</p>
<script>location.replace("../../../zerovec/ule/struct.NichedOption.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/ule/trait.NicheBytes.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/ule/trait.NicheBytes.html">../../../zerovec/ule/trait.NicheBytes.html</a>...</p>
<script>location.replace("../../../zerovec/ule/trait.NicheBytes.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/ule/union.NichedOptionULE.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/ule/union.NichedOptionULE.html">../../../zerovec/ule/union.NichedOptionULE.html</a>...</p>
<script>location.replace("../../../zerovec/ule/union.NichedOptionULE.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/ule/struct.OptionULE.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/ule/struct.OptionULE.html">../../../zerovec/ule/struct.OptionULE.html</a>...</p>
<script>location.replace("../../../zerovec/ule/struct.OptionULE.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/ule/struct.OptionVarULE.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/ule/struct.OptionVarULE.html">../../../zerovec/ule/struct.OptionVarULE.html</a>...</p>
<script>location.replace("../../../zerovec/ule/struct.OptionVarULE.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/ule/struct.RawBytesULE.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/ule/struct.RawBytesULE.html">../../../zerovec/ule/struct.RawBytesULE.html</a>...</p>
<script>location.replace("../../../zerovec/ule/struct.RawBytesULE.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"derive":["ULE","VarULE"],"enum":["UleError"],"mod":["custom","tuple","tuplevar","vartuple"],"struct":["CharULE","MultiFieldsULE","NichedOption","OptionULE","OptionVarULE","RawBytesULE"],"trait":["AsULE","EncodeAsVarULE","EqULE","NicheBytes","SliceAsULE","ULE","VarULE"],"union":["NichedOptionULE"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
<!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="The `ULE` types implementing this trait guarantee that `NicheBytes::NICHE_BIT_PATTERN` can never occur as a valid byte representation of the type."><title>NicheBytes in zerovec::ule - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="zerovec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.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"><!--[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="#">NicheBytes</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../zerovec/index.html">zerovec</a><span class="version">0.11.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Niche<wbr>Bytes</a></h2><h3><a href="#required-associated-consts">Required Associated Constants</a></h3><ul class="block"><li><a href="#associatedconstant.NICHE_BIT_PATTERN" title="NICHE_BIT_PATTERN">NICHE_BIT_PATTERN</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-NicheBytes%3C1%3E-for-NonZero%3Cu8%3E" title="NonZeroU8">NonZeroU8</a></li></ul><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 zerovec::<wbr>ule</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">zerovec</a>::<wbr><a href="index.html">ule</a></div><h1>Trait <span class="trait">Niche<wbr>Bytes</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/zerovec/ule/niche.rs.html#25-27">Source</a> </span></div><pre class="rust item-decl"><code>pub trait NicheBytes&lt;const N: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.usize.html">usize</a>&gt; {
const <a href="#associatedconstant.NICHE_BIT_PATTERN" class="constant">NICHE_BIT_PATTERN</a>: [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.array.html">N</a>];
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> types implementing this trait guarantee that <a href="trait.NicheBytes.html#associatedconstant.NICHE_BIT_PATTERN" title="associated constant zerovec::ule::NicheBytes::NICHE_BIT_PATTERN"><code>NicheBytes::NICHE_BIT_PATTERN</code></a>
can never occur as a valid byte representation of the type.</p>
<p>Guarantees for a valid implementation.</p>
<ol>
<li>N must be equal to <code>core::mem::sizeo_of::&lt;Self&gt;()</code> or else it will
cause panics.</li>
<li>The bit pattern <a href="trait.NicheBytes.html#associatedconstant.NICHE_BIT_PATTERN" title="associated constant zerovec::ule::NicheBytes::NICHE_BIT_PATTERN"><code>NicheBytes::NICHE_BIT_PATTERN</code></a> must not be incorrect as it would lead to
weird behaviour.</li>
<li>The abstractions built on top of this trait must panic on an invalid N.</li>
<li>The abstractions built on this trait that use type punning must ensure that type being
punned is <a href="trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a>.</li>
</ol>
</div></details><h2 id="required-associated-consts" class="section-header">Required Associated Constants<a href="#required-associated-consts" class="anchor">§</a></h2><div class="methods"><section id="associatedconstant.NICHE_BIT_PATTERN" class="method"><a class="src rightside" href="../../src/zerovec/ule/niche.rs.html#26">Source</a><h4 class="code-header">const <a href="#associatedconstant.NICHE_BIT_PATTERN" class="constant">NICHE_BIT_PATTERN</a>: [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.array.html">N</a>]</h4></section></div><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/1.93.1/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="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-NicheBytes%3C1%3E-for-NonZero%3Cu8%3E" class="impl"><a class="src rightside" href="../../src/zerovec/ule/plain.rs.html#245-247">Source</a><a href="#impl-NicheBytes%3C1%3E-for-NonZero%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.NicheBytes.html" title="trait zerovec::ule::NicheBytes">NicheBytes</a>&lt;1&gt; for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroU8.html" title="type core::num::nonzero::NonZeroU8">NonZeroU8</a></h3></section></summary><div class="impl-items"><section id="associatedconstant.NICHE_BIT_PATTERN-1" class="associatedconstant trait-impl"><a class="src rightside" href="../../src/zerovec/ule/plain.rs.html#246">Source</a><a href="#associatedconstant.NICHE_BIT_PATTERN-1" class="anchor">§</a><h4 class="code-header">const <a href="#associatedconstant.NICHE_BIT_PATTERN" class="constant">NICHE_BIT_PATTERN</a>: [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.array.html">1</a>]</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/zerovec/ule/niche/trait.NicheBytes.js" data-ignore-extern-crates="core" 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="A trait for a type where aligned slices can be cast to unaligned slices."><title>SliceAsULE in zerovec::ule - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="zerovec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.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"><!--[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="#">SliceAsULE</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../zerovec/index.html">zerovec</a><span class="version">0.11.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Slice<wbr>AsULE</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.slice_to_unaligned" title="slice_to_unaligned">slice_to_unaligned</a></li></ul><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 zerovec::<wbr>ule</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">zerovec</a>::<wbr><a href="index.html">ule</a></div><h1>Trait <span class="trait">Slice<wbr>AsULE</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/zerovec/ule/mod.rs.html#206-214">Source</a> </span></div><pre class="rust item-decl"><code>pub trait SliceAsULE<div class="where">where
Self: <a class="trait" href="trait.AsULE.html" title="trait zerovec::ule::AsULE">AsULE</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div>{
// Required method
fn <a href="#tymethod.slice_to_unaligned" class="fn">slice_to_unaligned</a>(slice: &amp;[Self]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[Self::<a class="associatedtype" href="trait.AsULE.html#associatedtype.ULE" title="type zerovec::ule::AsULE::ULE">ULE</a>]&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait for a type where aligned slices can be cast to unaligned slices.</p>
<p>Auto-implemented on all types implementing <a href="trait.EqULE.html" title="trait zerovec::ule::EqULE"><code>EqULE</code></a>.</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.slice_to_unaligned" class="method"><a class="src rightside" href="../../src/zerovec/ule/mod.rs.html#213">Source</a><h4 class="code-header">fn <a href="#tymethod.slice_to_unaligned" class="fn">slice_to_unaligned</a>(slice: &amp;[Self]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[Self::<a class="associatedtype" href="trait.AsULE.html#associatedtype.ULE" title="type zerovec::ule::AsULE::ULE">ULE</a>]&gt;</h4></section></summary><div class="docblock"><p>Converts from <code>&amp;[Self]</code> to <code>&amp;[Self::ULE]</code> if possible.</p>
<p>In general, this function returns <code>Some</code> on little-endian and <code>None</code> on big-endian.</p>
</div></details></div><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/1.93.1/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"><section id="impl-SliceAsULE-for-T" class="impl"><a class="src rightside" href="../../src/zerovec/ule/mod.rs.html#217-230">Source</a><a href="#impl-SliceAsULE-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.SliceAsULE.html" title="trait zerovec::ule::SliceAsULE">SliceAsULE</a> for T<div class="where">where
T: <a class="trait" href="trait.EqULE.html" title="trait zerovec::ule::EqULE">EqULE</a>,</div></h3><span class="item-info"><div class="stab portability">Available on <strong>little-endian</strong> only.</div></span></section></div><script src="../../trait.impl/zerovec/ule/trait.SliceAsULE.js" async></script></section></div></main></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,14 @@
<!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="ULE impls for tuples."><title>zerovec::ule::tuple - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="zerovec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.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"><!--[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 tuple</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../zerovec/index.html">zerovec</a><span class="version">0.11.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module tuple</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In zerovec::<wbr>ule</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">zerovec</a>::<wbr><a href="../index.html">ule</a></div><h1>Module <span>tuple</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/zerovec/ule/tuple.rs.html#5-180">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>ULE impls for tuples.</p>
<p>Rust does not guarantee the layout of tuples, so ZeroVec defines its own tuple ULE types.</p>
<p>Impls are defined for tuples of up to 6 elements. For longer tuples, use a custom struct
with <a href="../../attr.make_ule.html" title="attr zerovec::make_ule"><code>#[make_ule]</code></a>.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerovec::ZeroVec;
<span class="comment">// ZeroVec of tuples!
</span><span class="kw">let </span>zerovec: ZeroVec&lt;(u32, char)&gt; = [(<span class="number">1</span>, <span class="string">'a'</span>), (<span class="number">1234901</span>, <span class="string">'啊'</span>), (<span class="number">100</span>, <span class="string">'अ'</span>)]
.iter()
.copied()
.collect();
<span class="macro">assert_eq!</span>(zerovec.get(<span class="number">1</span>), <span class="prelude-val">Some</span>((<span class="number">1234901</span>, <span class="string">'啊'</span>)));</code></pre></div></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.Tuple2ULE.html" title="struct zerovec::ule::tuple::Tuple2ULE">Tuple2ULE</a></dt><dd>ULE type for tuples with 2 elements.</dd><dt><a class="struct" href="struct.Tuple3ULE.html" title="struct zerovec::ule::tuple::Tuple3ULE">Tuple3ULE</a></dt><dd>ULE type for tuples with 3 elements.</dd><dt><a class="struct" href="struct.Tuple4ULE.html" title="struct zerovec::ule::tuple::Tuple4ULE">Tuple4ULE</a></dt><dd>ULE type for tuples with 4 elements.</dd><dt><a class="struct" href="struct.Tuple5ULE.html" title="struct zerovec::ule::tuple::Tuple5ULE">Tuple5ULE</a></dt><dd>ULE type for tuples with 5 elements.</dd><dt><a class="struct" href="struct.Tuple6ULE.html" title="struct zerovec::ule::tuple::Tuple6ULE">Tuple6ULE</a></dt><dd>ULE type for tuples with 6 elements.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["Tuple2ULE","Tuple3ULE","Tuple4ULE","Tuple5ULE","Tuple6ULE"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
<!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="`VarULE` impls for tuples."><title>zerovec::ule::tuplevar - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="zerovec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.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"><!--[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 tuplevar</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../zerovec/index.html">zerovec</a><span class="version">0.11.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module tuplevar</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In zerovec::<wbr>ule</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">zerovec</a>::<wbr><a href="../index.html">ule</a></div><h1>Module <span>tuplevar</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/zerovec/ule/tuplevar.rs.html#5-307">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p><a href="../trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> impls for tuples.</p>
<p>This module exports <a href="struct.Tuple2VarULE.html" title="struct zerovec::ule::tuplevar::Tuple2VarULE"><code>Tuple2VarULE</code></a>, <a href="struct.Tuple3VarULE.html" title="struct zerovec::ule::tuplevar::Tuple3VarULE"><code>Tuple3VarULE</code></a>, …, the corresponding <a href="../trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> types
of tuples containing purely <a href="../trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> types.</p>
<p>This can be paired with <a href="../vartuple/struct.VarTupleULE.html" title="struct zerovec::ule::vartuple::VarTupleULE"><code>VarTupleULE</code></a> to make arbitrary combinations of <a href="../trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> and <a href="../trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> types.</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.Tuple2VarULE.html" title="struct zerovec::ule::tuplevar::Tuple2VarULE">Tuple2<wbr>VarULE</a></dt><dd>VarULE type for tuples with 2 elements. See module docs for more information</dd><dt><a class="struct" href="struct.Tuple3VarULE.html" title="struct zerovec::ule::tuplevar::Tuple3VarULE">Tuple3<wbr>VarULE</a></dt><dd>VarULE type for tuples with 3 elements. See module docs for more information</dd><dt><a class="struct" href="struct.Tuple4VarULE.html" title="struct zerovec::ule::tuplevar::Tuple4VarULE">Tuple4<wbr>VarULE</a></dt><dd>VarULE type for tuples with 4 elements. See module docs for more information</dd><dt><a class="struct" href="struct.Tuple5VarULE.html" title="struct zerovec::ule::tuplevar::Tuple5VarULE">Tuple5<wbr>VarULE</a></dt><dd>VarULE type for tuples with 5 elements. See module docs for more information</dd><dt><a class="struct" href="struct.Tuple6VarULE.html" title="struct zerovec::ule::tuplevar::Tuple6VarULE">Tuple6<wbr>VarULE</a></dt><dd>VarULE type for tuples with 6 elements. See module docs for more information</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["Tuple2VarULE","Tuple3VarULE","Tuple4VarULE","Tuple5VarULE","Tuple6VarULE"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,41 @@
<!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="Types to help compose fixed-size `ULE` and variable-size `VarULE` primitives."><title>zerovec::ule::vartuple - 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-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="zerovec" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.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"><!--[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 vartuple</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../zerovec/index.html">zerovec</a><span class="version">0.11.5</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module vartuple</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In zerovec::<wbr>ule</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"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">zerovec</a>::<wbr><a href="../index.html">ule</a></div><h1>Module <span>vartuple</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/zerovec/ule/vartuple.rs.html#5-312">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Types to help compose fixed-size <a href="../trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> and variable-size <a href="../trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> primitives.</p>
<p>This module exports <a href="struct.VarTuple.html" title="struct zerovec::ule::vartuple::VarTuple"><code>VarTuple</code></a> and <a href="struct.VarTupleULE.html" title="struct zerovec::ule::vartuple::VarTupleULE"><code>VarTupleULE</code></a>, which allow a single sized type and
a single unsized type to be stored together as a <a href="../trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a>.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerovec::ule::vartuple::{VarTuple, VarTupleULE};
<span class="kw">use </span>zerovec::VarZeroVec;
<span class="kw">struct </span>Employee&lt;<span class="lifetime">'a</span>&gt; {
id: u32,
name: <span class="kw-2">&amp;</span><span class="lifetime">'a </span>str,
};
<span class="kw">let </span>employees = [
Employee {
id: <span class="number">12345</span>,
name: <span class="string">"Jane Doe"</span>,
},
Employee {
id: <span class="number">67890</span>,
name: <span class="string">"John Doe"</span>,
},
];
<span class="kw">let </span>employees_as_var_tuples = employees
.into_iter()
.map(|x| VarTuple {
sized: x.id,
variable: x.name,
})
.collect::&lt;Vec&lt;<span class="kw">_</span>&gt;&gt;();
<span class="kw">let </span>employees_vzv: VarZeroVec&lt;VarTupleULE&lt;u32, str&gt;&gt; =
employees_as_var_tuples.as_slice().into();
<span class="macro">assert_eq!</span>(employees_vzv.len(), <span class="number">2</span>);
<span class="macro">assert_eq!</span>(employees_vzv.get(<span class="number">0</span>).unwrap().sized.as_unsigned_int(), <span class="number">12345</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>employees_vzv.get(<span class="number">0</span>).unwrap().variable, <span class="string">"Jane Doe"</span>);
<span class="macro">assert_eq!</span>(employees_vzv.get(<span class="number">1</span>).unwrap().sized.as_unsigned_int(), <span class="number">67890</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>employees_vzv.get(<span class="number">1</span>).unwrap().variable, <span class="string">"John Doe"</span>);</code></pre></div></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.VarTuple.html" title="struct zerovec::ule::vartuple::VarTuple">VarTuple</a></dt><dd>A sized type that can be converted to a <a href="struct.VarTupleULE.html" title="struct zerovec::ule::vartuple::VarTupleULE"><code>VarTupleULE</code></a>.</dd><dt><a class="struct" href="struct.VarTupleULE.html" title="struct zerovec::ule::vartuple::VarTupleULE">VarTupleULE</a></dt><dd>A dynamically-sized type combining a sized and an unsized type.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["VarTuple","VarTupleULE"]};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long