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

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,77 @@
<!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="Generate a corresponding `ULE` type and the relevant `AsULE` implementations for this type"><title>make_ule in zerovec - 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 attr"><!--[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="#">make_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="#">make_<wbr>ule</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 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>Attribute Macro <span class="attr">make_<wbr>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#31">Source</a> </span></div><pre class="rust item-decl"><code>#[make_ule]</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generate a corresponding <a href="ule/trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> type and the relevant <a href="ule/trait.AsULE.html" title="trait zerovec::ule::AsULE"><code>AsULE</code></a> implementations for this type</p>
<p>This can be attached to structs containing only <a href="ule/trait.AsULE.html" title="trait zerovec::ule::AsULE"><code>AsULE</code></a> types, or C-like enums that have <code>#[repr(u8)]</code>
and all explicit discriminants.</p>
<p>The type must be <a href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Copy.html" title="trait core::marker::Copy"><code>Copy</code></a>, <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq"><code>PartialEq</code></a>, and <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq"><code>Eq</code></a>.</p>
<p><code>#[make_ule]</code> will automatically derive the following traits on the <a href="ule/trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> type:</p>
<ul>
<li><a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord"><code>Ord</code></a> and <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd"><code>PartialOrd</code></a></li>
<li><a href="maps::ZeroMapKV"><code>ZeroMapKV</code></a></li>
</ul>
<p>To disable one of the automatic derives, use <code>#[zerovec::skip_derive(...)]</code> like so: <code>#[zerovec::skip_derive(ZeroMapKV)]</code>.
<code>Ord</code> and <code>PartialOrd</code> are implemented as a unit and can only be disabled as a group with <code>#[zerovec::skip_derive(Ord)]</code>.</p>
<p>The following traits are available to derive, but not automatic:</p>
<ul>
<li><a href="https://doc.rust-lang.org/1.93.1/core/fmt/macros/derive.Debug.html" title="derive core::fmt::macros::Debug"><code>Debug</code></a></li>
</ul>
<p>To enable one of these additional derives, use <code>#[zerovec::derive(...)]</code> like so: <code>#[zerovec::derive(Debug)]</code>.</p>
<p>In most cases these derives will defer to the impl of the same trait on the current type, so such impls must exist.</p>
<p>For enums, this attribute will generate a crate-public <code>fn new_from_u8(value: u8) -&gt; Option&lt;Self&gt;</code>
method on the main type that allows one to construct the value from a u8. If this method is desired
to be more public, it should be wrapped.</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerovec::ZeroVec;
<span class="attr">#[zerovec::make_ule(DateULE)]
#[derive(
Copy,
Clone,
PartialEq,
Eq,
Ord,
PartialOrd,
serde::Serialize,
serde::Deserialize,
)]
</span><span class="kw">struct </span>Date {
y: u64,
m: u8,
d: u8,
}
<span class="attr">#[derive(serde::Serialize, serde::Deserialize)]
</span><span class="kw">struct </span>Dates&lt;<span class="lifetime">'a</span>&gt; {
<span class="attr">#[serde(borrow)]
</span>dates: ZeroVec&lt;<span class="lifetime">'a</span>, Date&gt;,
}
<span class="kw">let </span>dates = Dates {
dates: ZeroVec::alloc_from_slice(<span class="kw-2">&amp;</span>[
Date {
y: <span class="number">1985</span>,
m: <span class="number">9</span>,
d: <span class="number">3</span>,
},
Date {
y: <span class="number">1970</span>,
m: <span class="number">2</span>,
d: <span class="number">20</span>,
},
Date {
y: <span class="number">1990</span>,
m: <span class="number">6</span>,
d: <span class="number">13</span>,
},
]),
};
<span class="kw">let </span>bincode_bytes =
bincode::serialize(<span class="kw-2">&amp;</span>dates).expect(<span class="string">"Serialization should be successful"</span>);
<span class="comment">// Will deserialize without allocations
</span><span class="kw">let </span>deserialized: Dates = bincode::deserialize(<span class="kw-2">&amp;</span>bincode_bytes)
.expect(<span class="string">"Deserialization should be successful"</span>);
<span class="macro">assert_eq!</span>(deserialized.dates.get(<span class="number">1</span>).unwrap().y, <span class="number">1970</span>);
<span class="macro">assert_eq!</span>(deserialized.dates.get(<span class="number">2</span>).unwrap().d, <span class="number">13</span>);</code></pre></div>
<p>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,106 @@
<!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="Generate a corresponding `VarULE` type and the relevant `EncodeAsVarULE`/[`zerofrom::ZeroFrom`] implementations for this type"><title>make_varule in zerovec - 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 attr"><!--[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="#">make_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"><section id="rustdoc-toc"><h2 class="location"><a href="#">make_<wbr>varule</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 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>Attribute Macro <span class="attr">make_<wbr>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#39">Source</a> </span></div><pre class="rust item-decl"><code>#[make_varule]</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generate a corresponding <a href="ule/trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> type and the relevant <a href="ule/trait.EncodeAsVarULE.html" title="trait zerovec::ule::EncodeAsVarULE"><code>EncodeAsVarULE</code></a>/<a href="../zerofrom/zero_from/trait.ZeroFrom.html" title="trait zerofrom::zero_from::ZeroFrom"><code>zerofrom::ZeroFrom</code></a>
implementations for this type</p>
<p>This can be attached to structs containing only <a href="ule/trait.AsULE.html" title="trait zerovec::ule::AsULE"><code>AsULE</code></a> types with the last fields being
<a href="alloc::borrow::Cow"><code>Cow&lt;'a, str&gt;</code></a>, <a href="struct.ZeroSlice.html" title="struct zerovec::ZeroSlice"><code>ZeroSlice</code></a>, or <a href="struct.VarZeroSlice.html" title="struct zerovec::VarZeroSlice"><code>VarZeroSlice</code></a>. If there is more than one such field, it will be represented
using <a href="ule/struct.MultiFieldsULE.html" title="struct zerovec::ule::MultiFieldsULE"><code>MultiFieldsULE</code></a> and getters will be generated. Other VarULE fields will be detected if they are
tagged with <code>#[zerovec::varule(NameOfVarULETy)]</code>.</p>
<p>The type must be <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq"><code>PartialEq</code></a> and <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Eq.html" title="trait core::cmp::Eq"><code>Eq</code></a>.</p>
<p><a href="ule/trait.EncodeAsVarULE.html" title="trait zerovec::ule::EncodeAsVarULE"><code>EncodeAsVarULE</code></a> and <a href="../zerofrom/zero_from/trait.ZeroFrom.html" title="trait zerofrom::zero_from::ZeroFrom"><code>zerofrom::ZeroFrom</code></a> are useful for avoiding the need to deal with
the <a href="ule/trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> type directly. In particular, it is recommended to use <a href="../zerofrom/zero_from/trait.ZeroFrom.html" title="trait zerofrom::zero_from::ZeroFrom"><code>zerofrom::ZeroFrom</code></a>
to convert the <a href="ule/trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> type back to this type in a cheap, zero-copy way (see the example below
for more details).</p>
<p><code>#[make_varule]</code> will automatically derive the following traits on the <a href="ule/trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> type:</p>
<ul>
<li><a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord"><code>Ord</code></a> and <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd"><code>PartialOrd</code></a></li>
<li><a href="maps::ZeroMapKV"><code>ZeroMapKV</code></a></li>
<li>[<code>alloc::borrow::ToOwned</code>]</li>
</ul>
<p>To disable one of the automatic derives, use <code>#[zerovec::skip_derive(...)]</code> like so: <code>#[zerovec::skip_derive(ZeroMapKV)]</code>.
<code>Ord</code> and <code>PartialOrd</code> are implemented as a unit and can only be disabled as a group with <code>#[zerovec::skip_derive(Ord)]</code>.</p>
<p>The following traits are available to derive, but not automatic:</p>
<ul>
<li><a href="https://doc.rust-lang.org/1.93.1/core/fmt/macros/derive.Debug.html" title="derive core::fmt::macros::Debug"><code>Debug</code></a></li>
<li><a href="serde::Serialize"><code>Serialize</code></a></li>
<li><a href="serde::Deserialize"><code>Deserialize</code></a></li>
</ul>
<p>To enable one of these additional derives, use <code>#[zerovec::derive(...)]</code> like so: <code>#[zerovec::derive(Debug)]</code>.</p>
<p>In most cases these derives will defer to the impl of the same trait on the current type, so such impls must exist.</p>
<p>This implementation will also by default autogenerate <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.Ord.html" title="trait core::cmp::Ord"><code>Ord</code></a> and <a href="https://doc.rust-lang.org/1.93.1/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd"><code>PartialOrd</code></a> on the <a href="ule/trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> type based on
the implementation on <code>Self</code>. You can opt out of this with <code>#[zerovec::skip_derive(Ord)]</code></p>
<p>Note that this implementation will autogenerate <a href="ule/trait.EncodeAsVarULE.html" title="trait zerovec::ule::EncodeAsVarULE"><code>EncodeAsVarULE</code></a> impls for <em>both</em> <code>Self</code> and <code>&amp;Self</code>
for convenience. This allows for a little more flexibility encoding slices.</p>
<p>In case there are multiple <a href="ule/trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> (i.e., variable-sized) fields, this macro will produce private fields that
appropriately pack the data together, with the packing format by default being <a href="vecs/struct.Index16.html" title="struct zerovec::vecs::Index16"><code>crate::vecs::Index16</code></a>, but can be
overridden with <code>#[zerovec::format(zerovec::vecs::Index8)]</code>.</p>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::borrow::Cow;
<span class="kw">use </span>zerofrom::ZeroFrom;
<span class="kw">use </span>zerovec::ule::encode_varule_to_box;
<span class="kw">use </span>zerovec::{VarZeroVec, ZeroMap, ZeroVec};
<span class="comment">// custom fixed-size ULE type for ZeroVec
</span><span class="attr">#[zerovec::make_ule(DateULE)]
#[derive(Copy, Clone, PartialEq, Eq, Ord, PartialOrd, serde::Serialize, serde::Deserialize)]
</span><span class="kw">struct </span>Date {
y: u64,
m: u8,
d: u8,
}
<span class="comment">// custom variable sized VarULE type for VarZeroVec
</span><span class="attr">#[zerovec::make_varule(PersonULE)]
#[zerovec::derive(Serialize, Deserialize)]
#[derive(Clone, PartialEq, Eq, Ord, PartialOrd, serde::Serialize, serde::Deserialize)]
</span><span class="kw">struct </span>Person&lt;<span class="lifetime">'a</span>&gt; {
birthday: Date,
favorite_character: char,
<span class="attr">#[serde(borrow)]
</span>name: Cow&lt;<span class="lifetime">'a</span>, str&gt;,
}
<span class="attr">#[derive(serde::Serialize, serde::Deserialize)]
</span><span class="kw">struct </span>Data&lt;<span class="lifetime">'a</span>&gt; {
<span class="comment">// note: VarZeroVec always must reference the ULE type directly
</span><span class="attr">#[serde(borrow)]
</span>important_people: VarZeroVec&lt;<span class="lifetime">'a</span>, PersonULE&gt;,
}
<span class="kw">let </span>person1 = Person {
birthday: Date {
y: <span class="number">1990</span>,
m: <span class="number">9</span>,
d: <span class="number">7</span>,
},
favorite_character: <span class="string">'π'</span>,
name: Cow::from(<span class="string">"Kate"</span>),
};
<span class="kw">let </span>person2 = Person {
birthday: Date {
y: <span class="number">1960</span>,
m: <span class="number">5</span>,
d: <span class="number">25</span>,
},
favorite_character: <span class="string">'冇'</span>,
name: Cow::from(<span class="string">"Jesse"</span>),
};
<span class="kw">let </span>important_people = VarZeroVec::from(<span class="kw-2">&amp;</span>[person1, person2]);
<span class="kw">let </span>data = Data { important_people };
<span class="kw">let </span>bincode_bytes = bincode::serialize(<span class="kw-2">&amp;</span>data).expect(<span class="string">"Serialization should be successful"</span>);
<span class="comment">// Will deserialize without allocations
</span><span class="kw">let </span>deserialized: Data =
bincode::deserialize(<span class="kw-2">&amp;</span>bincode_bytes).expect(<span class="string">"Deserialization should be successful"</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>deserialized.important_people.get(<span class="number">1</span>).unwrap().name, <span class="string">"Jesse"</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>deserialized.important_people.get(<span class="number">0</span>).unwrap().name, <span class="string">"Kate"</span>);
<span class="comment">// Since VarZeroVec produces PersonULE types, it's convenient to use ZeroFrom
// to recoup Person values in a zero-copy way
</span><span class="kw">let </span>person_converted: Person =
ZeroFrom::zero_from(deserialized.important_people.get(<span class="number">1</span>).unwrap());
<span class="macro">assert_eq!</span>(person_converted.name, <span class="string">"Jesse"</span>);
<span class="macro">assert_eq!</span>(person_converted.birthday.y, <span class="number">1960</span>);</code></pre></div>
<p>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/struct.VarZeroCow.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../zerovec/struct.VarZeroCow.html">../../zerovec/struct.VarZeroCow.html</a>...</p>
<script>location.replace("../../zerovec/struct.VarZeroCow.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,170 @@
<!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="Zero-copy vector abstractions for arbitrary types, backed by byte slices."><title>zerovec - 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="../crates.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 crate"><!--[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="#">Crate zerovec</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"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#cargo-features" title="Cargo features">Cargo features</a></li><li><a href="#examples" title="Examples">Examples</a></li><li><a href="#performance" title="Performance">Performance</a></li></ul><h3><a href="#modules">Crate Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#macros" title="Macros">Macros</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#attributes" title="Attribute Macros">Attribute Macros</a></li></ul></section><div id="rustdoc-modnav"></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"><h1>Crate <span>zerovec</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/lib.rs.html#5-576">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Zero-copy vector abstractions for arbitrary types, backed by byte slices.</p>
<p><code>zerovec</code> enables a far wider range of types — beyond just <code>&amp;[u8]</code> and <code>&amp;str</code> — to participate in
zero-copy deserialization from byte slices. It is <code>serde</code> compatible and comes equipped with
proc macros</p>
<p>Clients upgrading to <code>zerovec</code> benefit from zero heap allocations when deserializing
read-only data.</p>
<p>This crate has four main types:</p>
<ul>
<li><a href="struct.ZeroVec.html" title="struct zerovec::ZeroVec"><code>ZeroVec&lt;'a, T&gt;</code></a> (and <a href="struct.ZeroSlice.html" title="struct zerovec::ZeroSlice"><code>ZeroSlice&lt;T&gt;</code></a>) for fixed-width types like <code>u32</code></li>
<li><a href="struct.VarZeroVec.html" title="struct zerovec::VarZeroVec"><code>VarZeroVec&lt;'a, T&gt;</code></a> (and <a href="struct.ZeroSlice.html" title="struct zerovec::ZeroSlice"><code>VarZeroSlice&lt;T&gt;</code></a>) for variable-width types like <code>str</code></li>
<li><a href="ZeroMap"><code>ZeroMap&lt;'a, K, V&gt;</code></a> to map from <code>K</code> to <code>V</code></li>
<li><a href="ZeroMap2d"><code>ZeroMap2d&lt;'a, K0, K1, V&gt;</code></a> to map from the pair <code>(K0, K1)</code> to <code>V</code></li>
</ul>
<p>The first two are intended as close-to-drop-in replacements for <code>Vec&lt;T&gt;</code> in Serde structs. The third and fourth are
intended as a replacement for <code>HashMap</code> or <a href="https://docs.rs/litemap"><code>LiteMap</code></a>. When used with Serde derives, <strong>be sure to apply
<code>#[serde(borrow)]</code> to these types</strong>, same as one would for <a href="alloc::borrow::Cow"><code>Cow&lt;'a, T&gt;</code></a>.</p>
<p><a href="struct.ZeroVec.html" title="struct zerovec::ZeroVec"><code>ZeroVec&lt;'a, T&gt;</code></a>, <a href="struct.VarZeroVec.html" title="struct zerovec::VarZeroVec"><code>VarZeroVec&lt;'a, T&gt;</code></a>, <a href="ZeroMap"><code>ZeroMap&lt;'a, K, V&gt;</code></a>, and <a href="ZeroMap2d"><code>ZeroMap2d&lt;'a, K0, K1, V&gt;</code></a> all behave like
<a href="alloc::borrow::Cow"><code>Cow&lt;'a, T&gt;</code></a> in that they abstract over either borrowed or owned data. When performing deserialization
from human-readable formats (like <code>json</code> and <code>xml</code>), typically these types will allocate and fully own their data, whereas if deserializing
from binary formats like <code>bincode</code> and <code>postcard</code>, these types will borrow data directly from the buffer being deserialized from,
avoiding allocations and only performing validity checks. As such, this crate can be pretty fast (see <a href="#Performance">below</a> for more information)
on deserialization.</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 this crate
works under the hood.</p>
<h2 id="cargo-features"><a class="doc-anchor" href="#cargo-features">§</a>Cargo features</h2>
<p>This crate has several optional Cargo features:</p>
<ul>
<li><code>serde</code>: Allows serializing and deserializing <code>zerovec</code>s abstractions via <a href="https://docs.rs/serde"><code>serde</code></a></li>
<li><code>yoke</code>: Enables implementations of <code>Yokeable</code> from the <a href="https://docs.rs/yoke/"><code>yoke</code></a> crate, which is also useful
in situations involving a lot of zero-copy deserialization.</li>
<li><code>derive</code>: Makes it easier to use custom types in these collections by providing the <a href="attr.make_ule.html" title="attr zerovec::make_ule"><code>#[make_ule]</code></a> and
<a href="attr.make_varule.html" title="attr zerovec::make_varule"><code>#[make_varule]</code></a> proc macros, which generate appropriate <a href="ule/trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> and
<a href="ule/trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a>-conformant types for a given “normal” type.</li>
<li><code>std</code>: Enabled <code>std::Error</code> implementations for error types. This crate is by default <code>no_std</code> with a dependency on <code>alloc</code>.</li>
</ul>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<p>Serialize and deserialize a struct with ZeroVec and VarZeroVec with Bincode:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerovec::{VarZeroVec, ZeroVec};
<span class="comment">// This example requires the "serde" feature
</span><span class="attr">#[derive(serde::Serialize, serde::Deserialize)]
</span><span class="kw">pub struct </span>DataStruct&lt;<span class="lifetime">'data</span>&gt; {
<span class="attr">#[serde(borrow)]
</span>nums: ZeroVec&lt;<span class="lifetime">'data</span>, u32&gt;,
<span class="attr">#[serde(borrow)]
</span>chars: ZeroVec&lt;<span class="lifetime">'data</span>, char&gt;,
<span class="attr">#[serde(borrow)]
</span>strs: VarZeroVec&lt;<span class="lifetime">'data</span>, str&gt;,
}
<span class="kw">let </span>data = DataStruct {
nums: ZeroVec::from_slice_or_alloc(<span class="kw-2">&amp;</span>[<span class="number">211</span>, <span class="number">281</span>, <span class="number">421</span>, <span class="number">461</span>]),
chars: ZeroVec::alloc_from_slice(<span class="kw-2">&amp;</span>[<span class="string">'ö'</span>, <span class="string">'冇'</span>, <span class="string">'म'</span>]),
strs: VarZeroVec::from(<span class="kw-2">&amp;</span>[<span class="string">"hello"</span>, <span class="string">"world"</span>]),
};
<span class="kw">let </span>bincode_bytes =
bincode::serialize(<span class="kw-2">&amp;</span>data).expect(<span class="string">"Serialization should be successful"</span>);
<span class="macro">assert_eq!</span>(bincode_bytes.len(), <span class="number">63</span>);
<span class="kw">let </span>deserialized: DataStruct = bincode::deserialize(<span class="kw-2">&amp;</span>bincode_bytes)
.expect(<span class="string">"Deserialization should be successful"</span>);
<span class="macro">assert_eq!</span>(deserialized.nums.first(), <span class="prelude-val">Some</span>(<span class="number">211</span>));
<span class="macro">assert_eq!</span>(deserialized.chars.get(<span class="number">1</span>), <span class="prelude-val">Some</span>(<span class="string">'冇'</span>));
<span class="macro">assert_eq!</span>(deserialized.strs.get(<span class="number">1</span>), <span class="prelude-val">Some</span>(<span class="string">"world"</span>));
<span class="comment">// The deserialization will not have allocated anything
</span><span class="macro">assert!</span>(!deserialized.nums.is_owned());</code></pre></div>
<p>Use custom types inside of ZeroVec:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerovec::{ZeroVec, VarZeroVec, ZeroMap};
<span class="kw">use </span>std::borrow::Cow;
<span class="kw">use </span>zerovec::ule::encode_varule_to_box;
<span class="comment">// custom fixed-size ULE type for ZeroVec
</span><span class="attr">#[zerovec::make_ule(DateULE)]
#[derive(Copy, Clone, PartialEq, Eq, Ord, PartialOrd, serde::Serialize, serde::Deserialize)]
</span><span class="kw">struct </span>Date {
y: u64,
m: u8,
d: u8
}
<span class="comment">// custom variable sized VarULE type for VarZeroVec
</span><span class="attr">#[zerovec::make_varule(PersonULE)]
#[zerovec::derive(Serialize, Deserialize)] </span><span class="comment">// add Serde impls to PersonULE
</span><span class="attr">#[derive(Clone, PartialEq, Eq, Ord, PartialOrd, serde::Serialize, serde::Deserialize)]
</span><span class="kw">struct </span>Person&lt;<span class="lifetime">'a</span>&gt; {
birthday: Date,
favorite_character: char,
<span class="attr">#[serde(borrow)]
</span>name: Cow&lt;<span class="lifetime">'a</span>, str&gt;,
}
<span class="attr">#[derive(serde::Serialize, serde::Deserialize)]
</span><span class="kw">struct </span>Data&lt;<span class="lifetime">'a</span>&gt; {
<span class="attr">#[serde(borrow)]
</span>important_dates: ZeroVec&lt;<span class="lifetime">'a</span>, Date&gt;,
<span class="comment">// note: VarZeroVec always must reference the ULE type directly
</span><span class="attr">#[serde(borrow)]
</span>important_people: VarZeroVec&lt;<span class="lifetime">'a</span>, PersonULE&gt;,
<span class="attr">#[serde(borrow)]
</span>birthdays_to_people: ZeroMap&lt;<span class="lifetime">'a</span>, Date, PersonULE&gt;
}
<span class="kw">let </span>person1 = Person {
birthday: Date { y: <span class="number">1990</span>, m: <span class="number">9</span>, d: <span class="number">7</span>},
favorite_character: <span class="string">'π'</span>,
name: Cow::from(<span class="string">"Kate"</span>)
};
<span class="kw">let </span>person2 = Person {
birthday: Date { y: <span class="number">1960</span>, m: <span class="number">5</span>, d: <span class="number">25</span>},
favorite_character: <span class="string">'冇'</span>,
name: Cow::from(<span class="string">"Jesse"</span>)
};
<span class="kw">let </span>important_dates = ZeroVec::alloc_from_slice(<span class="kw-2">&amp;</span>[Date { y: <span class="number">1943</span>, m: <span class="number">3</span>, d: <span class="number">20</span>}, Date { y: <span class="number">1976</span>, m: <span class="number">8</span>, d: <span class="number">2</span>}, Date { y: <span class="number">1998</span>, m: <span class="number">2</span>, d: <span class="number">15</span>}]);
<span class="kw">let </span>important_people = VarZeroVec::from(<span class="kw-2">&amp;</span>[<span class="kw-2">&amp;</span>person1, <span class="kw-2">&amp;</span>person2]);
<span class="kw">let </span><span class="kw-2">mut </span>birthdays_to_people: ZeroMap&lt;Date, PersonULE&gt; = ZeroMap::new();
<span class="comment">// `.insert_var_v()` is slightly more convenient over `.insert()` for custom ULE types
</span>birthdays_to_people.insert_var_v(<span class="kw-2">&amp;</span>person1.birthday, <span class="kw-2">&amp;</span>person1);
birthdays_to_people.insert_var_v(<span class="kw-2">&amp;</span>person2.birthday, <span class="kw-2">&amp;</span>person2);
<span class="kw">let </span>data = Data { important_dates, important_people, birthdays_to_people };
<span class="kw">let </span>bincode_bytes = bincode::serialize(<span class="kw-2">&amp;</span>data)
.expect(<span class="string">"Serialization should be successful"</span>);
<span class="macro">assert_eq!</span>(bincode_bytes.len(), <span class="number">160</span>);
<span class="kw">let </span>deserialized: Data = bincode::deserialize(<span class="kw-2">&amp;</span>bincode_bytes)
.expect(<span class="string">"Deserialization should be successful"</span>);
<span class="macro">assert_eq!</span>(deserialized.important_dates.get(<span class="number">0</span>).unwrap().y, <span class="number">1943</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>deserialized.important_people.get(<span class="number">1</span>).unwrap().name, <span class="string">"Jesse"</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>deserialized.important_people.get(<span class="number">0</span>).unwrap().name, <span class="string">"Kate"</span>);
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>deserialized.birthdays_to_people.get(<span class="kw-2">&amp;</span>person1.birthday).unwrap().name, <span class="string">"Kate"</span>);
} <span class="comment">// feature = serde and derive</span></code></pre></div><h2 id="performance"><a class="doc-anchor" href="#performance">§</a>Performance</h2>
<p><code>zerovec</code> is designed for fast deserialization from byte buffers with zero memory allocations
while minimizing performance regressions for common vector operations.</p>
<p>Benchmark results on x86_64:</p>
<div><table><thead><tr><th>Operation</th><th><code>Vec&lt;T&gt;</code></th><th><code>zerovec</code></th></tr></thead><tbody>
<tr><td>Deserialize vec of 100 <code>u32</code></td><td>233.18 ns</td><td>14.120 ns</td></tr>
<tr><td>Compute sum of vec of 100 <code>u32</code> (read every element)</td><td>8.7472 ns</td><td>10.775 ns</td></tr>
<tr><td>Binary search vec of 1000 <code>u32</code> 50 times</td><td>442.80 ns</td><td>472.51 ns</td></tr>
<tr><td>Deserialize vec of 100 strings</td><td>7.3740 μs*</td><td>1.4495 μs</td></tr>
<tr><td>Count chars in vec of 100 strings (read every element)</td><td>747.50 ns</td><td>955.28 ns</td></tr>
<tr><td>Binary search vec of 500 strings 10 times</td><td>466.09 ns</td><td>790.33 ns</td></tr>
</tbody></table>
</div>
<p>* <em>This result is reported for <code>Vec&lt;String&gt;</code>. However, Serde also supports deserializing to the partially-zero-copy <code>Vec&lt;&amp;str&gt;</code>; this gives 1.8420 μs, much faster than <code>Vec&lt;String&gt;</code> but a bit slower than <code>zerovec</code>.</em></p>
<div><table><thead><tr><th>Operation</th><th><code>HashMap&lt;K,V&gt;</code></th><th><code>LiteMap&lt;K,V&gt;</code></th><th><code>ZeroMap&lt;K,V&gt;</code></th></tr></thead><tbody>
<tr><td>Deserialize a small map</td><td>2.72 μs</td><td>1.28 μs</td><td>480 ns</td></tr>
<tr><td>Deserialize a large map</td><td>50.5 ms</td><td>18.3 ms</td><td>3.74 ms</td></tr>
<tr><td>Look up from a small deserialized map</td><td>49 ns</td><td>42 ns</td><td>54 ns</td></tr>
<tr><td>Look up from a large deserialized map</td><td>51 ns</td><td>155 ns</td><td>213 ns</td></tr>
</tbody></table>
</div>
<p>Small = 16 elements, large = 131,072 elements. Maps contain <code>&lt;String, String&gt;</code>.</p>
<p>The benches used to generate the above table can be found in the <code>benches</code> directory in the project repository.
<code>zeromap</code> benches are named by convention, e.g. <code>zeromap/deserialize/small</code>, <code>zeromap/lookup/large</code>. The type
is appended for baseline comparisons, e.g. <code>zeromap/lookup/small/hashmap</code>.</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="ule/index.html" title="mod zerovec::ule">ule</a></dt><dd>Traits over unaligned little-endian data (ULE, pronounced “yule”).</dd><dt><a class="mod" href="vecs/index.html" title="mod zerovec::vecs">vecs</a></dt><dd>This module contains additional utility types for working with
<a href="struct.ZeroVec.html" title="struct zerovec::ZeroVec"><code>ZeroVec</code></a> and <a href="struct.VarZeroVec.html" title="struct zerovec::VarZeroVec"><code>VarZeroVec</code></a>. See their docs for more details on the general purpose
of these types.</dd></dl><h2 id="macros" class="section-header">Macros<a href="#macros" class="anchor">§</a></h2><dl class="item-table"><dt><a class="macro" href="macro.impl_ule_from_array.html" title="macro zerovec::impl_ule_from_array">impl_<wbr>ule_<wbr>from_<wbr>array</a></dt><dd>Given <code>Self</code> (<code>$aligned</code>), <code>Self::ULE</code> (<code>$unaligned</code>), and a conversion function (<code>$single</code> or
<code>Self::from_aligned</code>), implement <code>from_array</code> for arrays of <code>$aligned</code> to <code>$unaligned</code>.</dd><dt><a class="macro" href="macro.zeroslice.html" title="macro zerovec::zeroslice">zeroslice</a></dt><dd>Convenience wrapper for <a href="struct.ZeroSlice.html#method.from_ule_slice" title="associated function zerovec::ZeroSlice::from_ule_slice"><code>ZeroSlice::from_ule_slice</code></a>. The value will be created at compile-time,
meaning that all arguments must also be constant.</dd><dt><a class="macro" href="macro.zerovec.html" title="macro zerovec::zerovec">zerovec</a></dt><dd>Creates a borrowed <code>ZeroVec</code>. Convenience wrapper for <code>zeroslice!(...).as_zerovec()</code>. The value
will be created at compile-time, meaning that all arguments must also be constant.</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.VarZeroCow.html" title="struct zerovec::VarZeroCow">VarZero<wbr>Cow</a></dt><dd>Copy-on-write type that efficiently represents <a href="ule/trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> types as their bitstream representation.</dd><dt><a class="struct" href="struct.VarZeroSlice.html" title="struct zerovec::VarZeroSlice">VarZero<wbr>Slice</a></dt><dd>A zero-copy “slice”, that works for unsized types, i.e. the zero-copy version of <code>[T]</code>
where <code>T</code> is not <code>Sized</code>.</dd><dt><a class="struct" href="struct.VarZeroVec.html" title="struct zerovec::VarZeroVec">VarZero<wbr>Vec</a></dt><dd>A zero-copy, byte-aligned vector for variable-width types.</dd><dt><a class="struct" href="struct.ZeroSlice.html" title="struct zerovec::ZeroSlice">Zero<wbr>Slice</a></dt><dd>A zero-copy “slice”, i.e. the zero-copy version of <code>[T]</code>.</dd><dt><a class="struct" href="struct.ZeroVec.html" title="struct zerovec::ZeroVec">ZeroVec</a></dt><dd>A zero-copy, byte-aligned vector for fixed-width types.</dd></dl><h2 id="attributes" class="section-header">Attribute Macros<a href="#attributes" class="anchor">§</a></h2><dl class="item-table"><dt><a class="attr" href="attr.make_ule.html" title="attr zerovec::make_ule">make_<wbr>ule</a></dt><dd>Generate a corresponding <a href="ule/trait.ULE.html" title="trait zerovec::ule::ULE"><code>ULE</code></a> type and the relevant <a href="ule/trait.AsULE.html" title="trait zerovec::ule::AsULE"><code>AsULE</code></a> implementations for this type</dd><dt><a class="attr" href="attr.make_varule.html" title="attr zerovec::make_varule">make_<wbr>varule</a></dt><dd>Generate a corresponding <a href="ule/trait.VarULE.html" title="trait zerovec::ule::VarULE"><code>VarULE</code></a> type and the relevant <a href="ule/trait.EncodeAsVarULE.html" title="trait zerovec::ule::EncodeAsVarULE"><code>EncodeAsVarULE</code></a>/<a href="../zerofrom/zero_from/trait.ZeroFrom.html" title="trait zerofrom::zero_from::ZeroFrom"><code>zerofrom::ZeroFrom</code></a>
implementations for this type</dd></dl><script type="text/json" id="notable-traits-data">{"&[u8]":"<h3>Notable traits for <code>&amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.u8.html\">u8</a>]</code></h3><pre><code><div class=\"where\">impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/std/io/trait.Read.html\" title=\"trait std::io::Read\">Read</a> for &amp;[<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.u8.html\">u8</a>]</div>","VarZeroSliceIter<'b, T, F>":"<h3>Notable traits for <code><a class=\"struct\" href=\"vecs/struct.VarZeroSliceIter.html\" title=\"struct zerovec::vecs::VarZeroSliceIter\">VarZeroSliceIter</a>&lt;'a, T, F&gt;</code></h3><pre><code><div class=\"where\">impl&lt;'a, T: <a class=\"trait\" href=\"ule/trait.VarULE.html\" title=\"trait zerovec::ule::VarULE\">VarULE</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>, F: <a class=\"trait\" href=\"vecs/trait.VarZeroVecFormat.html\" title=\"trait zerovec::vecs::VarZeroVecFormat\">VarZeroVecFormat</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"vecs/struct.VarZeroSliceIter.html\" title=\"struct zerovec::vecs::VarZeroSliceIter\">VarZeroSliceIter</a>&lt;'a, T, F&gt;</div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.93.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"primitive\" href=\"https://doc.rust-lang.org/1.93.1/std/primitive.reference.html\">&amp;'a T</a>;</div>"}</script></section></div></main></body></html>

View File

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

View File

@@ -0,0 +1,8 @@
<!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="Given `Self` (`$aligned`), `Self::ULE` (`$unaligned`), and a conversion function (`$single` or `Self::from_aligned`), implement `from_array` for arrays of `$aligned` to `$unaligned`."><title>impl_ule_from_array in zerovec - 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 macro"><!--[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="#">impl_ule_from_array</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"></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>Macro <span class="macro">impl_<wbr>ule_<wbr>from_<wbr>array</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/macros.rs.html#11-29">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! impl_ule_from_array {
($aligned:ty, $unaligned:ty, $default:expr, $single:path) =&gt; { ... };
($aligned:ty, $unaligned:ty, $default:expr) =&gt; { ... };
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Given <code>Self</code> (<code>$aligned</code>), <code>Self::ULE</code> (<code>$unaligned</code>), and a conversion function (<code>$single</code> or
<code>Self::from_aligned</code>), implement <code>from_array</code> for arrays of <code>$aligned</code> to <code>$unaligned</code>.</p>
<p>The <code>$default</code> argument is due to current compiler limitations.
Pass any (cheap to construct) value.</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=macro.zeroslice.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.zeroslice.html">macro.zeroslice.html</a>...</p>
<script>location.replace("macro.zeroslice.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<!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="Convenience wrapper for `ZeroSlice::from_ule_slice`. The value will be created at compile-time, meaning that all arguments must also be constant."><title>zeroslice in zerovec - 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 macro"><!--[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="#">zeroslice</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="#">zeroslice</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#arguments" title="Arguments">Arguments</a></li><li><a href="#examples" title="Examples">Examples</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>Macro <span class="macro">zeroslice</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/zerovec/mod.rs.html#1180-1187">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! zeroslice {
() =&gt; { ... };
($aligned:ty; $convert:expr; [$($x:expr),+ $(,)?]) =&gt; { ... };
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Convenience wrapper for <a href="struct.ZeroSlice.html#method.from_ule_slice" title="associated function zerovec::ZeroSlice::from_ule_slice"><code>ZeroSlice::from_ule_slice</code></a>. The value will be created at compile-time,
meaning that all arguments must also be constant.</p>
<h2 id="arguments"><a class="doc-anchor" href="#arguments">§</a>Arguments</h2>
<ul>
<li><code>$aligned</code> - The type of an element in its canonical, aligned form, e.g., <code>char</code>.</li>
<li><code>$convert</code> - A const function that converts an <code>$aligned</code> into its unaligned equivalent, e.g.,
const fn from_aligned(a: CanonicalType) -&gt; CanonicalType::ULE`.</li>
<li><code>$x</code> - The elements that the <code>ZeroSlice</code> will hold.</li>
</ul>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<p>Using array-conversion functions provided by this crate:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerovec::{ZeroSlice, zeroslice, ule::AsULE};
<span class="kw">const </span>SIGNATURE: <span class="kw-2">&amp;</span>ZeroSlice&lt;char&gt; = <span class="macro">zeroslice!</span>(char; &lt;char <span class="kw">as </span>AsULE&gt;::ULE::from_aligned; [<span class="string">'b'</span>, <span class="string">'y'</span>, <span class="string">'e'</span>, <span class="string">'✌'</span>]);
<span class="kw">const </span>EMPTY: <span class="kw-2">&amp;</span>ZeroSlice&lt;u32&gt; = <span class="macro">zeroslice!</span>[];
<span class="kw">let </span>empty: <span class="kw-2">&amp;</span>ZeroSlice&lt;u32&gt; = <span class="macro">zeroslice!</span>[];
<span class="kw">let </span>nums = <span class="macro">zeroslice!</span>(u32; &lt;u32 <span class="kw">as </span>AsULE&gt;::ULE::from_unsigned; [<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]);
<span class="macro">assert_eq!</span>(nums.last().unwrap(), <span class="number">5</span>);</code></pre></div>
<p>Using a custom array-conversion function:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerovec::{ule::AsULE, ule::RawBytesULE, zeroslice, ZeroSlice};
<span class="kw">const fn </span>be_convert(num: i16) -&gt; &lt;i16 <span class="kw">as </span>AsULE&gt;::ULE {
RawBytesULE(num.to_be_bytes())
}
<span class="kw">const </span>NUMBERS_BE: <span class="kw-2">&amp;</span>ZeroSlice&lt;i16&gt; =
<span class="macro">zeroslice!</span>(i16; be_convert; [<span class="number">1</span>, -<span class="number">2</span>, <span class="number">3</span>, -<span class="number">4</span>, <span class="number">5</span>]);</code></pre></div></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=macro.zerovec.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="macro.zerovec.html">macro.zerovec.html</a>...</p>
<script>location.replace("macro.zerovec.html" + location.search + location.hash);</script>
</body>
</html>

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="Creates a borrowed `ZeroVec`. Convenience wrapper for `zeroslice!(...).as_zerovec()`. The value will be created at compile-time, meaning that all arguments must also be constant."><title>zerovec in zerovec - 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 macro"><!--[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="#">zerovec</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="#">zerovec</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</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>Macro <span class="macro">zerovec</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/zerovec/mod.rs.html#1206-1213">Source</a> </span></div><pre class="rust item-decl"><code>macro_rules! zerovec {
() =&gt; { ... };
($aligned:ty; $convert:expr; [$($x:expr),+ $(,)?]) =&gt; { ... };
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Creates a borrowed <code>ZeroVec</code>. Convenience wrapper for <code>zeroslice!(...).as_zerovec()</code>. The value
will be created at compile-time, meaning that all arguments must also be constant.</p>
<p>See <a href="macro.zeroslice.html" title="macro zerovec::zeroslice"><code>zeroslice!</code></a> for more information.</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, zerovec, ule::AsULE};
<span class="kw">const </span>SIGNATURE: ZeroVec&lt;char&gt; = <span class="macro">zerovec!</span>(char; &lt;char <span class="kw">as </span>AsULE&gt;::ULE::from_aligned; [<span class="string">'a'</span>, <span class="string">'y'</span>, <span class="string">'e'</span>, <span class="string">'✌'</span>]);
<span class="macro">assert!</span>(!SIGNATURE.is_owned());
<span class="kw">const </span>EMPTY: ZeroVec&lt;u32&gt; = <span class="macro">zerovec!</span>[];
<span class="macro">assert!</span>(!EMPTY.is_owned());</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"attr":["make_ule","make_varule"],"macro":["impl_ule_from_array","zeroslice","zerovec"],"mod":["ule","vecs"],"struct":["VarZeroCow","VarZeroSlice","VarZeroVec","ZeroSlice","ZeroVec"]};

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,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

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../zerovec/vecs/struct.Index16.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/vecs/struct.Index16.html">../../../zerovec/vecs/struct.Index16.html</a>...</p>
<script>location.replace("../../../zerovec/vecs/struct.Index16.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/vecs/struct.Index32.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/vecs/struct.Index32.html">../../../zerovec/vecs/struct.Index32.html</a>...</p>
<script>location.replace("../../../zerovec/vecs/struct.Index32.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/vecs/struct.Index8.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/vecs/struct.Index8.html">../../../zerovec/vecs/struct.Index8.html</a>...</p>
<script>location.replace("../../../zerovec/vecs/struct.Index8.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/vecs/struct.VarZeroSliceIter.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/vecs/struct.VarZeroSliceIter.html">../../../zerovec/vecs/struct.VarZeroSliceIter.html</a>...</p>
<script>location.replace("../../../zerovec/vecs/struct.VarZeroSliceIter.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/vecs/trait.VarZeroVecFormat.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/vecs/trait.VarZeroVecFormat.html">../../../zerovec/vecs/trait.VarZeroVecFormat.html</a>...</p>
<script>location.replace("../../../zerovec/vecs/trait.VarZeroVecFormat.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/struct.VarZeroSlice.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/struct.VarZeroSlice.html">../../../zerovec/struct.VarZeroSlice.html</a>...</p>
<script>location.replace("../../../zerovec/struct.VarZeroSlice.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/struct.VarZeroVec.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/struct.VarZeroVec.html">../../../zerovec/struct.VarZeroVec.html</a>...</p>
<script>location.replace("../../../zerovec/struct.VarZeroVec.html" + location.search + location.hash);</script>
</body>
</html>

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="This module contains additional utility types for working with `ZeroVec` and `VarZeroVec`. See their docs for more details on the general purpose of these types."><title>zerovec::vecs - 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 vecs</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 vecs</a></h2><h3><a href="#reexports">Module Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><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 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>vecs</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/lib.rs.html#287">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This module contains additional utility types for working with
<a href="../struct.ZeroVec.html" title="struct zerovec::ZeroVec"><code>ZeroVec</code></a> and <a href="../struct.VarZeroVec.html" title="struct zerovec::VarZeroVec"><code>VarZeroVec</code></a>. See their docs for more details on the general purpose
of these types.</p>
<p><a href="../struct.ZeroSlice.html" title="struct zerovec::ZeroSlice"><code>ZeroSlice</code></a> and <a href="../struct.VarZeroSlice.html" title="struct zerovec::VarZeroSlice"><code>VarZeroSlice</code></a> provide slice-like versions of the vector types
for use behind references and in custom ULE types.</p>
<p>[<code>VarZeroVecOwned</code>] is a special owned/mutable version of <a href="../struct.VarZeroVec.html" title="struct zerovec::VarZeroVec"><code>VarZeroVec</code></a>, allowing
direct manipulation of the backing buffer.</p>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><dl class="item-table reexports"><dt id="reexport.ZeroSlice"><code>pub use crate::zerovec::<a class="struct" href="../struct.ZeroSlice.html" title="struct zerovec::ZeroSlice">ZeroSlice</a>;</code></dt><dt id="reexport.ZeroVec"><code>pub use crate::zerovec::<a class="struct" href="../struct.ZeroVec.html" title="struct zerovec::ZeroVec">ZeroVec</a>;</code></dt><dt id="reexport.VarZeroSlice"><code>pub use crate::varzerovec::<a class="struct" href="../struct.VarZeroSlice.html" title="struct zerovec::VarZeroSlice">VarZeroSlice</a>;</code></dt><dt id="reexport.VarZeroVec"><code>pub use crate::varzerovec::<a class="struct" href="../struct.VarZeroVec.html" title="struct zerovec::VarZeroVec">VarZeroVec</a>;</code></dt></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.Index8.html" title="struct zerovec::vecs::Index8">Index8</a></dt><dd>This is a <a href="trait.VarZeroVecFormat.html" title="trait zerovec::vecs::VarZeroVecFormat"><code>VarZeroVecFormat</code></a> that stores u8s in the index array, and a u8 for a length.</dd><dt><a class="struct" href="struct.Index16.html" title="struct zerovec::vecs::Index16">Index16</a></dt><dd>This is a <a href="trait.VarZeroVecFormat.html" title="trait zerovec::vecs::VarZeroVecFormat"><code>VarZeroVecFormat</code></a> that stores u16s in the index array, and a u16 for a length.</dd><dt><a class="struct" href="struct.Index32.html" title="struct zerovec::vecs::Index32">Index32</a></dt><dd>This is a <a href="trait.VarZeroVecFormat.html" title="trait zerovec::vecs::VarZeroVecFormat"><code>VarZeroVecFormat</code></a> that stores u32s in the index array, and a u32 for a length.
Will have a larger data size, but will support large arrays without
problems.</dd><dt><a class="struct" href="struct.VarZeroSliceIter.html" title="struct zerovec::vecs::VarZeroSliceIter">VarZero<wbr>Slice<wbr>Iter</a></dt><dd>An iterator over VarZeroSlice</dd><dt><a class="struct" href="struct.ZeroSliceIter.html" title="struct zerovec::vecs::ZeroSliceIter">Zero<wbr>Slice<wbr>Iter</a></dt><dd>An iterator over elements in a VarZeroVec</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.VarZeroVecFormat.html" title="trait zerovec::vecs::VarZeroVecFormat">VarZero<wbr>VecFormat</a></dt><dd>This trait allows switching between different possible internal
representations of VarZeroVec.</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.VarZeroSlice16.html" title="type zerovec::vecs::VarZeroSlice16">VarZero<wbr>Slice16</a></dt><dt><a class="type" href="type.VarZeroSlice32.html" title="type zerovec::vecs::VarZeroSlice32">VarZero<wbr>Slice32</a></dt><dt><a class="type" href="type.VarZeroVec16.html" title="type zerovec::vecs::VarZeroVec16">VarZero<wbr>Vec16</a></dt><dt><a class="type" href="type.VarZeroVec32.html" title="type zerovec::vecs::VarZeroVec32">VarZero<wbr>Vec32</a></dt></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"struct":["Index16","Index32","Index8","VarZeroSliceIter","ZeroSliceIter"],"trait":["VarZeroVecFormat"],"type":["VarZeroSlice16","VarZeroSlice32","VarZeroVec16","VarZeroVec32"]};

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,8 @@
<!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="This trait allows switching between different possible internal representations of VarZeroVec."><title>VarZeroVecFormat in zerovec::vecs - 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="#">VarZeroVecFormat</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="#">VarZero<wbr>VecFormat</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 zerovec::<wbr>vecs</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">vecs</a></div><h1>Trait <span class="trait">VarZero<wbr>VecFormat</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/varzerovec/components.rs.html#22-33">Source</a> </span></div><pre class="rust item-decl"><code>pub trait VarZeroVecFormat: 'static + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> { }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This trait allows switching between different possible internal
representations of VarZeroVec.</p>
<p>Currently this crate supports three formats: <a href="struct.Index8.html" title="struct zerovec::vecs::Index8"><code>Index8</code></a>, <a href="struct.Index16.html" title="struct zerovec::vecs::Index16"><code>Index16</code></a> and <a href="struct.Index32.html" title="struct zerovec::vecs::Index32"><code>Index32</code></a>,
with <a href="struct.Index16.html" title="struct zerovec::vecs::Index16"><code>Index16</code></a> being the default for all <a href="../struct.VarZeroVec.html" title="struct zerovec::VarZeroVec"><code>VarZeroVec</code></a>
types unless explicitly specified otherwise.</p>
<p>Do not implement this trait, its internals may be changed in the future,
and all of its associated items are hidden from the docs.</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/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-VarZeroVecFormat-for-Index8" class="impl"><a class="src rightside" href="../../src/zerovec/varzerovec/components.rs.html#93-96">Source</a><a href="#impl-VarZeroVecFormat-for-Index8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.VarZeroVecFormat.html" title="trait zerovec::vecs::VarZeroVecFormat">VarZeroVecFormat</a> for <a class="struct" href="struct.Index8.html" title="struct zerovec::vecs::Index8">Index8</a></h3></section><section id="impl-VarZeroVecFormat-for-Index16" class="impl"><a class="src rightside" href="../../src/zerovec/varzerovec/components.rs.html#98-101">Source</a><a href="#impl-VarZeroVecFormat-for-Index16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.VarZeroVecFormat.html" title="trait zerovec::vecs::VarZeroVecFormat">VarZeroVecFormat</a> for <a class="struct" href="struct.Index16.html" title="struct zerovec::vecs::Index16">Index16</a></h3></section><section id="impl-VarZeroVecFormat-for-Index32" class="impl"><a class="src rightside" href="../../src/zerovec/varzerovec/components.rs.html#103-106">Source</a><a href="#impl-VarZeroVecFormat-for-Index32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.VarZeroVecFormat.html" title="trait zerovec::vecs::VarZeroVecFormat">VarZeroVecFormat</a> for <a class="struct" href="struct.Index32.html" title="struct zerovec::vecs::Index32">Index32</a></h3></section></div><script src="../../trait.impl/zerovec/varzerovec/components/trait.VarZeroVecFormat.js" async></script></section></div></main></body></html>

View File

@@ -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="API documentation for the Rust `VarZeroSlice16` type in crate `zerovec`."><title>VarZeroSlice16 in zerovec::vecs - 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 type"><!--[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="#">VarZeroSlice16</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="#">VarZero<wbr>Slice16</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In zerovec::<wbr>vecs</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">vecs</a></div><h1>Type Alias <span class="type">VarZero<wbr>Slice16</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/lib.rs.html#312">Source</a> </span></div><pre class="rust item-decl"><code>pub type VarZeroSlice16&lt;T&gt; = <a class="struct" href="../struct.VarZeroSlice.html" title="struct zerovec::VarZeroSlice">VarZeroSlice</a>&lt;T, <a class="struct" href="struct.Index16.html" title="struct zerovec::vecs::Index16">Index16</a>&gt;;</code></pre><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 VarZeroSlice16&lt;T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../../type.impl/zerovec/struct.VarZeroSlice.js" data-self-path="zerovec::vecs::VarZeroSlice16" async></script></section></div></main></body></html>

View File

@@ -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="API documentation for the Rust `VarZeroSlice32` type in crate `zerovec`."><title>VarZeroSlice32 in zerovec::vecs - 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 type"><!--[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="#">VarZeroSlice32</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="#">VarZero<wbr>Slice32</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In zerovec::<wbr>vecs</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">vecs</a></div><h1>Type Alias <span class="type">VarZero<wbr>Slice32</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/lib.rs.html#313">Source</a> </span></div><pre class="rust item-decl"><code>pub type VarZeroSlice32&lt;T&gt; = <a class="struct" href="../struct.VarZeroSlice.html" title="struct zerovec::VarZeroSlice">VarZeroSlice</a>&lt;T, <a class="struct" href="struct.Index32.html" title="struct zerovec::vecs::Index32">Index32</a>&gt;;</code></pre><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 VarZeroSlice32&lt;T&gt; { <span class="comment">/* private fields */</span> }</code></pre><script src="../../type.impl/zerovec/struct.VarZeroSlice.js" data-self-path="zerovec::vecs::VarZeroSlice32" async></script></section></div></main></body></html>

View File

@@ -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="API documentation for the Rust `VarZeroVec16` type in crate `zerovec`."><title>VarZeroVec16 in zerovec::vecs - 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 type"><!--[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="#">VarZeroVec16</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="#">VarZero<wbr>Vec16</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In zerovec::<wbr>vecs</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">vecs</a></div><h1>Type Alias <span class="type">VarZero<wbr>Vec16</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/lib.rs.html#310">Source</a> </span></div><pre class="rust item-decl"><code>pub type VarZeroVec16&lt;'a, T&gt; = <a class="struct" href="../struct.VarZeroVec.html" title="struct zerovec::VarZeroVec">VarZeroVec</a>&lt;'a, T, <a class="struct" href="struct.Index16.html" title="struct zerovec::vecs::Index16">Index16</a>&gt;;</code></pre><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 VarZeroVec16&lt;'a, T&gt;(<span class="comment">/* private fields */</span>);</code></pre><script src="../../type.impl/zerovec/struct.VarZeroVec.js" data-self-path="zerovec::vecs::VarZeroVec16" async></script></section></div></main></body></html>

View File

@@ -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="API documentation for the Rust `VarZeroVec32` type in crate `zerovec`."><title>VarZeroVec32 in zerovec::vecs - 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 type"><!--[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="#">VarZeroVec32</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="#">VarZero<wbr>Vec32</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In zerovec::<wbr>vecs</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">vecs</a></div><h1>Type Alias <span class="type">VarZero<wbr>Vec32</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/lib.rs.html#311">Source</a> </span></div><pre class="rust item-decl"><code>pub type VarZeroVec32&lt;'a, T&gt; = <a class="struct" href="../struct.VarZeroVec.html" title="struct zerovec::VarZeroVec">VarZeroVec</a>&lt;'a, T, <a class="struct" href="struct.Index32.html" title="struct zerovec::vecs::Index32">Index32</a>&gt;;</code></pre><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 VarZeroVec32&lt;'a, T&gt;(<span class="comment">/* private fields */</span>);</code></pre><script src="../../type.impl/zerovec/struct.VarZeroVec.js" data-self-path="zerovec::vecs::VarZeroVec32" async></script></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/struct.ZeroSlice.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/struct.ZeroSlice.html">../../../zerovec/struct.ZeroSlice.html</a>...</p>
<script>location.replace("../../../zerovec/struct.ZeroSlice.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/vecs/struct.ZeroSliceIter.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../zerovec/vecs/struct.ZeroSliceIter.html">../../../zerovec/vecs/struct.ZeroSliceIter.html</a>...</p>
<script>location.replace("../../../zerovec/vecs/struct.ZeroSliceIter.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/struct.ZeroVec.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../zerovec/struct.ZeroVec.html">../../zerovec/struct.ZeroVec.html</a>...</p>
<script>location.replace("../../zerovec/struct.ZeroVec.html" + location.search + location.hash);</script>
</body>
</html>