Files
GopherGate/target/doc/zerovec/index.html
2026-02-26 12:00:21 -05:00

170 lines
23 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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>