Files
GopherGate/target/doc/zerocopy/trait.IntoBytes.html
2026-02-26 12:00:21 -05:00

256 lines
80 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="Types that can be converted to an immutable slice of initialized bytes."><title>IntoBytes in zerocopy - 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="zerocopy" 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="#">IntoBytes</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../zerocopy/index.html">zerocopy</a><span class="version">0.8.39</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Into<wbr>Bytes</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#implementation" title="Implementation">Implementation</a></li><li><a href="#safety" title="Safety">Safety</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.as_bytes" title="as_bytes">as_bytes</a></li><li><a href="#method.as_mut_bytes" title="as_mut_bytes">as_mut_bytes</a></li><li><a href="#method.write_to" title="write_to">write_to</a></li><li><a href="#method.write_to_prefix" title="write_to_prefix">write_to_prefix</a></li><li><a href="#method.write_to_suffix" title="write_to_suffix">write_to_suffix</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-IntoBytes-for-()" title="()">()</a></li><li><a href="#impl-IntoBytes-for-AtomicBool" title="AtomicBool">AtomicBool</a></li><li><a href="#impl-IntoBytes-for-AtomicI8" title="AtomicI8">AtomicI8</a></li><li><a href="#impl-IntoBytes-for-AtomicI16" title="AtomicI16">AtomicI16</a></li><li><a href="#impl-IntoBytes-for-AtomicI32" title="AtomicI32">AtomicI32</a></li><li><a href="#impl-IntoBytes-for-AtomicI64" title="AtomicI64">AtomicI64</a></li><li><a href="#impl-IntoBytes-for-AtomicIsize" title="AtomicIsize">AtomicIsize</a></li><li><a href="#impl-IntoBytes-for-AtomicU8" title="AtomicU8">AtomicU8</a></li><li><a href="#impl-IntoBytes-for-AtomicU16" title="AtomicU16">AtomicU16</a></li><li><a href="#impl-IntoBytes-for-AtomicU32" title="AtomicU32">AtomicU32</a></li><li><a href="#impl-IntoBytes-for-AtomicU64" title="AtomicU64">AtomicU64</a></li><li><a href="#impl-IntoBytes-for-AtomicUsize" title="AtomicUsize">AtomicUsize</a></li><li><a href="#impl-IntoBytes-for-Cell%3CT%3E" title="Cell&#60;T&#62;">Cell&#60;T&#62;</a></li><li><a href="#impl-IntoBytes-for-ManuallyDrop%3CT%3E" title="ManuallyDrop&#60;T&#62;">ManuallyDrop&#60;T&#62;</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Ci8%3E" title="NonZeroI8">NonZeroI8</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Ci16%3E" title="NonZeroI16">NonZeroI16</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Ci32%3E" title="NonZeroI32">NonZeroI32</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Ci64%3E" title="NonZeroI64">NonZeroI64</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Ci128%3E" title="NonZeroI128">NonZeroI128</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Cisize%3E" title="NonZeroIsize">NonZeroIsize</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Cu8%3E" title="NonZeroU8">NonZeroU8</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Cu16%3E" title="NonZeroU16">NonZeroU16</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Cu32%3E" title="NonZeroU32">NonZeroU32</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Cu64%3E" title="NonZeroU64">NonZeroU64</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Cu128%3E" title="NonZeroU128">NonZeroU128</a></li><li><a href="#impl-IntoBytes-for-NonZero%3Cusize%3E" title="NonZeroUsize">NonZeroUsize</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci8%3E%3E" title="Option&#60;NonZeroI8&#62;">Option&#60;NonZeroI8&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci16%3E%3E" title="Option&#60;NonZeroI16&#62;">Option&#60;NonZeroI16&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci32%3E%3E" title="Option&#60;NonZeroI32&#62;">Option&#60;NonZeroI32&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci64%3E%3E" title="Option&#60;NonZeroI64&#62;">Option&#60;NonZeroI64&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci128%3E%3E" title="Option&#60;NonZeroI128&#62;">Option&#60;NonZeroI128&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cisize%3E%3E" title="Option&#60;NonZeroIsize&#62;">Option&#60;NonZeroIsize&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu8%3E%3E" title="Option&#60;NonZeroU8&#62;">Option&#60;NonZeroU8&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu16%3E%3E" title="Option&#60;NonZeroU16&#62;">Option&#60;NonZeroU16&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu32%3E%3E" title="Option&#60;NonZeroU32&#62;">Option&#60;NonZeroU32&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu64%3E%3E" title="Option&#60;NonZeroU64&#62;">Option&#60;NonZeroU64&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu128%3E%3E" title="Option&#60;NonZeroU128&#62;">Option&#60;NonZeroU128&#62;</a></li><li><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cusize%3E%3E" title="Option&#60;NonZeroUsize&#62;">Option&#60;NonZeroUsize&#62;</a></li><li><a href="#impl-IntoBytes-for-PhantomData%3CT%3E" title="PhantomData&#60;T&#62;">PhantomData&#60;T&#62;</a></li><li><a href="#impl-IntoBytes-for-UnsafeCell%3CT%3E" title="UnsafeCell&#60;T&#62;">UnsafeCell&#60;T&#62;</a></li><li><a href="#impl-IntoBytes-for-Wrapping%3CT%3E" title="Wrapping&#60;T&#62;">Wrapping&#60;T&#62;</a></li><li><a href="#impl-IntoBytes-for-%5BT;+N%5D" title="[T; N]">[T; N]</a></li><li><a href="#impl-IntoBytes-for-%5BT%5D" title="[T]">[T]</a></li><li><a href="#impl-IntoBytes-for-__m128" title="__m128">__m128</a></li><li><a href="#impl-IntoBytes-for-__m256" title="__m256">__m256</a></li><li><a href="#impl-IntoBytes-for-__m512" title="__m512">__m512</a></li><li><a href="#impl-IntoBytes-for-__m128d" title="__m128d">__m128d</a></li><li><a href="#impl-IntoBytes-for-__m128i" title="__m128i">__m128i</a></li><li><a href="#impl-IntoBytes-for-__m256d" title="__m256d">__m256d</a></li><li><a href="#impl-IntoBytes-for-__m256i" title="__m256i">__m256i</a></li><li><a href="#impl-IntoBytes-for-__m512bh" title="__m512bh">__m512bh</a></li><li><a href="#impl-IntoBytes-for-__m512d" title="__m512d">__m512d</a></li><li><a href="#impl-IntoBytes-for-__m512i" title="__m512i">__m512i</a></li><li><a href="#impl-IntoBytes-for-bool" title="bool">bool</a></li><li><a href="#impl-IntoBytes-for-char" title="char">char</a></li><li><a href="#impl-IntoBytes-for-f32" title="f32">f32</a></li><li><a href="#impl-IntoBytes-for-f64" title="f64">f64</a></li><li><a href="#impl-IntoBytes-for-i8" title="i8">i8</a></li><li><a href="#impl-IntoBytes-for-i16" title="i16">i16</a></li><li><a href="#impl-IntoBytes-for-i32" title="i32">i32</a></li><li><a href="#impl-IntoBytes-for-i64" title="i64">i64</a></li><li><a href="#impl-IntoBytes-for-i128" title="i128">i128</a></li><li><a href="#impl-IntoBytes-for-isize" title="isize">isize</a></li><li><a href="#impl-IntoBytes-for-str" title="str">str</a></li><li><a href="#impl-IntoBytes-for-u8" title="u8">u8</a></li><li><a href="#impl-IntoBytes-for-u16" title="u16">u16</a></li><li><a href="#impl-IntoBytes-for-u32" title="u32">u32</a></li><li><a href="#impl-IntoBytes-for-u64" title="u64">u64</a></li><li><a href="#impl-IntoBytes-for-u128" title="u128">u128</a></li><li><a href="#impl-IntoBytes-for-usize" title="usize">usize</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 class="in-crate"><a href="index.html">In crate zerocopy</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">zerocopy</a></div><h1>Trait <span class="trait">Into<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/zerocopy/lib.rs.html#5195-5621">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait IntoBytes {
// Provided methods
fn <a href="#method.as_bytes" class="fn">as_bytes</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]
<span class="where">where Self: <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.as_mut_bytes" class="fn">as_mut_bytes</a>(&amp;mut self) -&gt; &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]
<span class="where">where Self: <a class="trait" href="trait.FromBytes.html" title="trait zerocopy::FromBytes">FromBytes</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.write_to" class="fn">write_to</a>(
&amp;self,
dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.unit.html">()</a>, <a class="struct" href="error/struct.SizeError.html" title="struct zerocopy::error::SizeError">SizeError</a>&lt;&amp;Self, &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]&gt;&gt;
<span class="where">where Self: <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.write_to_prefix" class="fn">write_to_prefix</a>(
&amp;self,
dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.unit.html">()</a>, <a class="struct" href="error/struct.SizeError.html" title="struct zerocopy::error::SizeError">SizeError</a>&lt;&amp;Self, &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]&gt;&gt;
<span class="where">where Self: <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
<span class="item-spacer"></span> fn <a href="#method.write_to_suffix" class="fn">write_to_suffix</a>(
&amp;self,
dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.unit.html">()</a>, <a class="struct" href="error/struct.SizeError.html" title="struct zerocopy::error::SizeError">SizeError</a>&lt;&amp;Self, &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]&gt;&gt;
<span class="where">where Self: <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Types that can be converted to an immutable slice of initialized bytes.</p>
<p>Any <code>IntoBytes</code> type can be converted to a slice of initialized bytes of the
same size. This is useful for efficiently serializing structured data as raw
bytes.</p>
<h2 id="implementation"><a class="doc-anchor" href="#implementation">§</a>Implementation</h2>
<p><strong>Do not implement this trait yourself!</strong> Instead, use
<a href="derive.IntoBytes.html" title="derive zerocopy::IntoBytes"><code>#[derive(IntoBytes)]</code></a>; e.g.:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#[derive(IntoBytes)]
#[repr(C)]
</span><span class="kw">struct </span>MyStruct {
...
}
<span class="attr">#[derive(IntoBytes)]
#[repr(u8)]
</span><span class="kw">enum </span>MyEnum {
...
}</code></pre></div>
<p>This derive performs a sophisticated, compile-time safety analysis to
determine whether a type is <code>IntoBytes</code>. See the <a href="derive.IntoBytes.html" title="derive zerocopy::IntoBytes">derive
documentation</a> for guidance on how to interpret error messages
produced by the derives analysis.</p>
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
<p><em>This section describes what is required in order for <code>T: IntoBytes</code>, and
what unsafe code may assume of such types. If you dont plan on implementing
<code>IntoBytes</code> manually, and you dont plan on writing unsafe code that
operates on <code>IntoBytes</code> types, then you dont need to read this section.</em></p>
<p>If <code>T: IntoBytes</code>, then unsafe code may assume that it is sound to treat any
<code>t: T</code> as an immutable <code>[u8]</code> of length <code>size_of_val(t)</code>. If a type is
marked as <code>IntoBytes</code> which violates this contract, it may cause undefined
behavior.</p>
<p><code>#[derive(IntoBytes)]</code> only permits <a href="derive.IntoBytes.html#analysis" title="derive zerocopy::IntoBytes">types which satisfy these
requirements</a>.</p>
</div></details><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.as_bytes" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#5237-5267">Source</a><h4 class="code-header">fn <a href="#method.as_bytes" class="fn">as_bytes</a>(&amp;self) -&gt; &amp;[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]<div class="where">where
Self: <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Gets the bytes of this value.</p>
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::IntoBytes;
<span class="attr">#[derive(IntoBytes, Immutable)]
#[repr(C)]
</span><span class="kw">struct </span>PacketHeader {
src_port: [u8; <span class="number">2</span>],
dst_port: [u8; <span class="number">2</span>],
length: [u8; <span class="number">2</span>],
checksum: [u8; <span class="number">2</span>],
}
<span class="kw">let </span>header = PacketHeader {
src_port: [<span class="number">0</span>, <span class="number">1</span>],
dst_port: [<span class="number">2</span>, <span class="number">3</span>],
length: [<span class="number">4</span>, <span class="number">5</span>],
checksum: [<span class="number">6</span>, <span class="number">7</span>],
};
<span class="kw">let </span>bytes = header.as_bytes();
<span class="macro">assert_eq!</span>(bytes, [<span class="number">0</span>, <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="number">6</span>, <span class="number">7</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.as_mut_bytes" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#5309-5339">Source</a><h4 class="code-header">fn <a href="#method.as_mut_bytes" class="fn">as_mut_bytes</a>(&amp;mut self) -&gt; &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]<div class="where">where
Self: <a class="trait" href="trait.FromBytes.html" title="trait zerocopy::FromBytes">FromBytes</a>,</div></h4></section></summary><div class="docblock"><p>Gets the bytes of this value mutably.</p>
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::IntoBytes;
<span class="attr">#[derive(FromBytes, IntoBytes, Immutable)]
#[repr(C)]
</span><span class="kw">struct </span>PacketHeader {
src_port: [u8; <span class="number">2</span>],
dst_port: [u8; <span class="number">2</span>],
length: [u8; <span class="number">2</span>],
checksum: [u8; <span class="number">2</span>],
}
<span class="kw">let </span><span class="kw-2">mut </span>header = PacketHeader {
src_port: [<span class="number">0</span>, <span class="number">1</span>],
dst_port: [<span class="number">2</span>, <span class="number">3</span>],
length: [<span class="number">4</span>, <span class="number">5</span>],
checksum: [<span class="number">6</span>, <span class="number">7</span>],
};
<span class="kw">let </span>bytes = header.as_mut_bytes();
<span class="macro">assert_eq!</span>(bytes, [<span class="number">0</span>, <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="number">6</span>, <span class="number">7</span>]);
bytes.reverse();
<span class="macro">assert_eq!</span>(header, PacketHeader {
src_port: [<span class="number">7</span>, <span class="number">6</span>],
dst_port: [<span class="number">5</span>, <span class="number">4</span>],
length: [<span class="number">3</span>, <span class="number">2</span>],
checksum: [<span class="number">1</span>, <span class="number">0</span>],
});</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.write_to" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#5390-5405">Source</a><h4 class="code-header">fn <a href="#method.write_to" class="fn">write_to</a>(&amp;self, dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.unit.html">()</a>, <a class="struct" href="error/struct.SizeError.html" title="struct zerocopy::error::SizeError">SizeError</a>&lt;&amp;Self, &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]&gt;&gt;<div class="where">where
Self: <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Writes a copy of <code>self</code> to <code>dst</code>.</p>
<p>If <code>dst.len() != size_of_val(self)</code>, <code>write_to</code> returns <code>Err</code>.</p>
<h5 id="examples-2"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::IntoBytes;
<span class="attr">#[derive(IntoBytes, Immutable)]
#[repr(C)]
</span><span class="kw">struct </span>PacketHeader {
src_port: [u8; <span class="number">2</span>],
dst_port: [u8; <span class="number">2</span>],
length: [u8; <span class="number">2</span>],
checksum: [u8; <span class="number">2</span>],
}
<span class="kw">let </span>header = PacketHeader {
src_port: [<span class="number">0</span>, <span class="number">1</span>],
dst_port: [<span class="number">2</span>, <span class="number">3</span>],
length: [<span class="number">4</span>, <span class="number">5</span>],
checksum: [<span class="number">6</span>, <span class="number">7</span>],
};
<span class="kw">let </span><span class="kw-2">mut </span>bytes = [<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
header.write_to(<span class="kw-2">&amp;mut </span>bytes[..]);
<span class="macro">assert_eq!</span>(bytes, [<span class="number">0</span>, <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="number">6</span>, <span class="number">7</span>]);</code></pre></div>
<p>If too many or too few target bytes are provided, <code>write_to</code> returns
<code>Err</code> and leaves the target bytes unmodified:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>excessive_bytes = <span class="kw-2">&amp;mut </span>[<span class="number">0u8</span>; <span class="number">128</span>][..];
<span class="kw">let </span>write_result = header.write_to(excessive_bytes);
<span class="macro">assert!</span>(write_result.is_err());
<span class="macro">assert_eq!</span>(excessive_bytes, [<span class="number">0u8</span>; <span class="number">128</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.write_to_prefix" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#5457-5474">Source</a><h4 class="code-header">fn <a href="#method.write_to_prefix" class="fn">write_to_prefix</a>(
&amp;self,
dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.unit.html">()</a>, <a class="struct" href="error/struct.SizeError.html" title="struct zerocopy::error::SizeError">SizeError</a>&lt;&amp;Self, &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]&gt;&gt;<div class="where">where
Self: <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Writes a copy of <code>self</code> to the prefix of <code>dst</code>.</p>
<p><code>write_to_prefix</code> writes <code>self</code> to the first <code>size_of_val(self)</code> bytes
of <code>dst</code>. If <code>dst.len() &lt; size_of_val(self)</code>, it returns <code>Err</code>.</p>
<h5 id="examples-3"><a class="doc-anchor" href="#examples-3">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::IntoBytes;
<span class="attr">#[derive(IntoBytes, Immutable)]
#[repr(C)]
</span><span class="kw">struct </span>PacketHeader {
src_port: [u8; <span class="number">2</span>],
dst_port: [u8; <span class="number">2</span>],
length: [u8; <span class="number">2</span>],
checksum: [u8; <span class="number">2</span>],
}
<span class="kw">let </span>header = PacketHeader {
src_port: [<span class="number">0</span>, <span class="number">1</span>],
dst_port: [<span class="number">2</span>, <span class="number">3</span>],
length: [<span class="number">4</span>, <span class="number">5</span>],
checksum: [<span class="number">6</span>, <span class="number">7</span>],
};
<span class="kw">let </span><span class="kw-2">mut </span>bytes = [<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
header.write_to_prefix(<span class="kw-2">&amp;mut </span>bytes[..]);
<span class="macro">assert_eq!</span>(bytes, [<span class="number">0</span>, <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="number">6</span>, <span class="number">7</span>, <span class="number">0</span>, <span class="number">0</span>]);</code></pre></div>
<p>If insufficient target bytes are provided, <code>write_to_prefix</code> returns
<code>Err</code> and leaves the target bytes unmodified:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>insufficient_bytes = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>][..];
<span class="kw">let </span>write_result = header.write_to_suffix(insufficient_bytes);
<span class="macro">assert!</span>(write_result.is_err());
<span class="macro">assert_eq!</span>(insufficient_bytes, [<span class="number">0</span>, <span class="number">0</span>]);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.write_to_suffix" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#5533-5560">Source</a><h4 class="code-header">fn <a href="#method.write_to_suffix" class="fn">write_to_suffix</a>(
&amp;self,
dst: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.unit.html">()</a>, <a class="struct" href="error/struct.SizeError.html" title="struct zerocopy::error::SizeError">SizeError</a>&lt;&amp;Self, &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]&gt;&gt;<div class="where">where
Self: <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Writes a copy of <code>self</code> to the suffix of <code>dst</code>.</p>
<p><code>write_to_suffix</code> writes <code>self</code> to the last <code>size_of_val(self)</code> bytes of
<code>dst</code>. If <code>dst.len() &lt; size_of_val(self)</code>, it returns <code>Err</code>.</p>
<h5 id="examples-4"><a class="doc-anchor" href="#examples-4">§</a>Examples</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::IntoBytes;
<span class="attr">#[derive(IntoBytes, Immutable)]
#[repr(C)]
</span><span class="kw">struct </span>PacketHeader {
src_port: [u8; <span class="number">2</span>],
dst_port: [u8; <span class="number">2</span>],
length: [u8; <span class="number">2</span>],
checksum: [u8; <span class="number">2</span>],
}
<span class="kw">let </span>header = PacketHeader {
src_port: [<span class="number">0</span>, <span class="number">1</span>],
dst_port: [<span class="number">2</span>, <span class="number">3</span>],
length: [<span class="number">4</span>, <span class="number">5</span>],
checksum: [<span class="number">6</span>, <span class="number">7</span>],
};
<span class="kw">let </span><span class="kw-2">mut </span>bytes = [<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>];
header.write_to_suffix(<span class="kw-2">&amp;mut </span>bytes[..]);
<span class="macro">assert_eq!</span>(bytes, [<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <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="number">6</span>, <span class="number">7</span>]);
<span class="kw">let </span><span class="kw-2">mut </span>insufficient_bytes = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>][..];
<span class="kw">let </span>write_result = header.write_to_suffix(insufficient_bytes);
<span class="macro">assert!</span>(write_result.is_err());
<span class="macro">assert_eq!</span>(insufficient_bytes, [<span class="number">0</span>, <span class="number">0</span>]);</code></pre></div>
<p>If insufficient target bytes are provided, <code>write_to_suffix</code> returns
<code>Err</code> and leaves the target bytes unmodified:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>insufficient_bytes = <span class="kw-2">&amp;mut </span>[<span class="number">0</span>, <span class="number">0</span>][..];
<span class="kw">let </span>write_result = header.write_to_suffix(insufficient_bytes);
<span class="macro">assert!</span>(write_result.is_err());
<span class="macro">assert_eq!</span>(insufficient_bytes, [<span class="number">0</span>, <span class="number">0</span>]);</code></pre></div></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="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><section id="impl-IntoBytes-for-Option%3CNonZero%3Ci8%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#281">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci8%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI8.html" title="type core::num::nonzero::NonZeroI8">NonZeroI8</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Ci16%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#284">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci16%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI16.html" title="type core::num::nonzero::NonZeroI16">NonZeroI16</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Ci32%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#286">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci32%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI32.html" title="type core::num::nonzero::NonZeroI32">NonZeroI32</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Ci64%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#288">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci64%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI64.html" title="type core::num::nonzero::NonZeroI64">NonZeroI64</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Ci128%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#290">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Ci128%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI128.html" title="type core::num::nonzero::NonZeroI128">NonZeroI128</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Cisize%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#292">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cisize%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroIsize.html" title="type core::num::nonzero::NonZeroIsize">NonZeroIsize</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Cu8%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#280">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu8%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<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>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Cu16%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#283">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu16%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroU16.html" title="type core::num::nonzero::NonZeroU16">NonZeroU16</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Cu32%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#285">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu32%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroU32.html" title="type core::num::nonzero::NonZeroU32">NonZeroU32</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Cu64%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#287">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu64%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroU64.html" title="type core::num::nonzero::NonZeroU64">NonZeroU64</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Cu128%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#289">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cu128%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroU128.html" title="type core::num::nonzero::NonZeroU128">NonZeroU128</a>&gt;</h3></section><section id="impl-IntoBytes-for-Option%3CNonZero%3Cusize%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#291">Source</a><a href="#impl-IntoBytes-for-Option%3CNonZero%3Cusize%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <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;<a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroUsize.html" title="type core::num::nonzero::NonZeroUsize">NonZeroUsize</a>&gt;</h3></section><section id="impl-IntoBytes-for-bool" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#99">Source</a><a href="#impl-IntoBytes-for-bool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.bool.html">bool</a></h3></section><section id="impl-IntoBytes-for-char" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#129">Source</a><a href="#impl-IntoBytes-for-char" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.char.html">char</a></h3></section><section id="impl-IntoBytes-for-f32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#79">Source</a><a href="#impl-IntoBytes-for-f32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.f32.html">f32</a></h3></section><section id="impl-IntoBytes-for-f64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#80">Source</a><a href="#impl-IntoBytes-for-f64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.f64.html">f64</a></h3></section><section id="impl-IntoBytes-for-i8" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#67">Source</a><a href="#impl-IntoBytes-for-i8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.i8.html">i8</a></h3></section><section id="impl-IntoBytes-for-i16" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#70">Source</a><a href="#impl-IntoBytes-for-i16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.i16.html">i16</a></h3></section><section id="impl-IntoBytes-for-i32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#72">Source</a><a href="#impl-IntoBytes-for-i32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.i32.html">i32</a></h3></section><section id="impl-IntoBytes-for-i64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#74">Source</a><a href="#impl-IntoBytes-for-i64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.i64.html">i64</a></h3></section><section id="impl-IntoBytes-for-i128" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#76">Source</a><a href="#impl-IntoBytes-for-i128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.i128.html">i128</a></h3></section><section id="impl-IntoBytes-for-isize" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#78">Source</a><a href="#impl-IntoBytes-for-isize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.isize.html">isize</a></h3></section><section id="impl-IntoBytes-for-str" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#163">Source</a><a href="#impl-IntoBytes-for-str" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.str.html">str</a></h3></section><section id="impl-IntoBytes-for-u8" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#66">Source</a><a href="#impl-IntoBytes-for-u8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a></h3></section><section id="impl-IntoBytes-for-u16" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#69">Source</a><a href="#impl-IntoBytes-for-u16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u16.html">u16</a></h3></section><section id="impl-IntoBytes-for-u32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#71">Source</a><a href="#impl-IntoBytes-for-u32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u32.html">u32</a></h3></section><section id="impl-IntoBytes-for-u64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#73">Source</a><a href="#impl-IntoBytes-for-u64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u64.html">u64</a></h3></section><section id="impl-IntoBytes-for-u128" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#75">Source</a><a href="#impl-IntoBytes-for-u128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u128.html">u128</a></h3></section><section id="impl-IntoBytes-for-()" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#30">Source</a><a href="#impl-IntoBytes-for-()" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.unit.html">()</a></h3></section><section id="impl-IntoBytes-for-usize" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#77">Source</a><a href="#impl-IntoBytes-for-usize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a></h3></section><section id="impl-IntoBytes-for-__m128" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-IntoBytes-for-__m128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m128.html" title="struct core::core_arch::x86::__m128">__m128</a></h3></section><section id="impl-IntoBytes-for-__m128d" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-IntoBytes-for-__m128d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m128d.html" title="struct core::core_arch::x86::__m128d">__m128d</a></h3></section><section id="impl-IntoBytes-for-__m128i" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-IntoBytes-for-__m128i" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m128i.html" title="struct core::core_arch::x86::__m128i">__m128i</a></h3></section><section id="impl-IntoBytes-for-__m256" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-IntoBytes-for-__m256" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m256.html" title="struct core::core_arch::x86::__m256">__m256</a></h3></section><section id="impl-IntoBytes-for-__m256d" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-IntoBytes-for-__m256d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m256d.html" title="struct core::core_arch::x86::__m256d">__m256d</a></h3></section><section id="impl-IntoBytes-for-__m256i" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-IntoBytes-for-__m256i" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m256i.html" title="struct core::core_arch::x86::__m256i">__m256i</a></h3></section><section id="impl-IntoBytes-for-__m512" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1336-1340">Source</a><a href="#impl-IntoBytes-for-__m512" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m512.html" title="struct core::core_arch::x86::__m512">__m512</a></h3></section><section id="impl-IntoBytes-for-__m512bh" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1336-1340">Source</a><a href="#impl-IntoBytes-for-__m512bh" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m512bh.html" title="struct core::core_arch::x86::__m512bh">__m512bh</a></h3></section><section id="impl-IntoBytes-for-__m512d" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1336-1340">Source</a><a href="#impl-IntoBytes-for-__m512d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m512d.html" title="struct core::core_arch::x86::__m512d">__m512d</a></h3></section><section id="impl-IntoBytes-for-__m512i" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1336-1340">Source</a><a href="#impl-IntoBytes-for-__m512i" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/core_arch/x86/struct.__m512i.html" title="struct core::core_arch::x86::__m512i">__m512i</a></h3></section><section id="impl-IntoBytes-for-AtomicBool" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#464">Source</a><a href="#impl-IntoBytes-for-AtomicBool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicBool.html" title="struct core::sync::atomic::AtomicBool">AtomicBool</a></h3></section><section id="impl-IntoBytes-for-AtomicI8" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#459">Source</a><a href="#impl-IntoBytes-for-AtomicI8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicI8.html" title="struct core::sync::atomic::AtomicI8">AtomicI8</a></h3></section><section id="impl-IntoBytes-for-AtomicI16" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#525">Source</a><a href="#impl-IntoBytes-for-AtomicI16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicI16.html" title="struct core::sync::atomic::AtomicI16">AtomicI16</a></h3></section><section id="impl-IntoBytes-for-AtomicI32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#552">Source</a><a href="#impl-IntoBytes-for-AtomicI32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicI32.html" title="struct core::sync::atomic::AtomicI32">AtomicI32</a></h3></section><section id="impl-IntoBytes-for-AtomicI64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#579">Source</a><a href="#impl-IntoBytes-for-AtomicI64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicI64.html" title="struct core::sync::atomic::AtomicI64">AtomicI64</a></h3></section><section id="impl-IntoBytes-for-AtomicIsize" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#606">Source</a><a href="#impl-IntoBytes-for-AtomicIsize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicIsize.html" title="struct core::sync::atomic::AtomicIsize">AtomicIsize</a></h3></section><section id="impl-IntoBytes-for-AtomicU8" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#459">Source</a><a href="#impl-IntoBytes-for-AtomicU8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicU8.html" title="struct core::sync::atomic::AtomicU8">AtomicU8</a></h3></section><section id="impl-IntoBytes-for-AtomicU16" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#525">Source</a><a href="#impl-IntoBytes-for-AtomicU16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicU16.html" title="struct core::sync::atomic::AtomicU16">AtomicU16</a></h3></section><section id="impl-IntoBytes-for-AtomicU32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#552">Source</a><a href="#impl-IntoBytes-for-AtomicU32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicU32.html" title="struct core::sync::atomic::AtomicU32">AtomicU32</a></h3></section><section id="impl-IntoBytes-for-AtomicU64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#579">Source</a><a href="#impl-IntoBytes-for-AtomicU64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicU64.html" title="struct core::sync::atomic::AtomicU64">AtomicU64</a></h3></section><section id="impl-IntoBytes-for-AtomicUsize" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#606">Source</a><a href="#impl-IntoBytes-for-AtomicUsize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicUsize.html" title="struct core::sync::atomic::AtomicUsize">AtomicUsize</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Ci8%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#226">Source</a><a href="#impl-IntoBytes-for-NonZero%3Ci8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI8.html" title="type core::num::nonzero::NonZeroI8">NonZeroI8</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Ci16%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#229">Source</a><a href="#impl-IntoBytes-for-NonZero%3Ci16%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI16.html" title="type core::num::nonzero::NonZeroI16">NonZeroI16</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Ci32%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#231">Source</a><a href="#impl-IntoBytes-for-NonZero%3Ci32%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI32.html" title="type core::num::nonzero::NonZeroI32">NonZeroI32</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Ci64%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#233">Source</a><a href="#impl-IntoBytes-for-NonZero%3Ci64%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI64.html" title="type core::num::nonzero::NonZeroI64">NonZeroI64</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Ci128%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#235">Source</a><a href="#impl-IntoBytes-for-NonZero%3Ci128%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroI128.html" title="type core::num::nonzero::NonZeroI128">NonZeroI128</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Cisize%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#237">Source</a><a href="#impl-IntoBytes-for-NonZero%3Cisize%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroIsize.html" title="type core::num::nonzero::NonZeroIsize">NonZeroIsize</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Cu8%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#225">Source</a><a href="#impl-IntoBytes-for-NonZero%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> 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><section id="impl-IntoBytes-for-NonZero%3Cu16%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#228">Source</a><a href="#impl-IntoBytes-for-NonZero%3Cu16%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroU16.html" title="type core::num::nonzero::NonZeroU16">NonZeroU16</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Cu32%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#230">Source</a><a href="#impl-IntoBytes-for-NonZero%3Cu32%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroU32.html" title="type core::num::nonzero::NonZeroU32">NonZeroU32</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Cu64%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#232">Source</a><a href="#impl-IntoBytes-for-NonZero%3Cu64%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroU64.html" title="type core::num::nonzero::NonZeroU64">NonZeroU64</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Cu128%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#234">Source</a><a href="#impl-IntoBytes-for-NonZero%3Cu128%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroU128.html" title="type core::num::nonzero::NonZeroU128">NonZeroU128</a></h3></section><section id="impl-IntoBytes-for-NonZero%3Cusize%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#236">Source</a><a href="#impl-IntoBytes-for-NonZero%3Cusize%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="type" href="https://doc.rust-lang.org/1.93.1/core/num/nonzero/type.NonZeroUsize.html" title="type core::num::nonzero::NonZeroUsize">NonZeroUsize</a></h3></section><section id="impl-IntoBytes-for-%5BT%5D" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#936">Source</a><a href="#impl-IntoBytes-for-%5BT%5D" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.slice.html">[T]</a></h3></section><section id="impl-IntoBytes-for-Wrapping%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#664">Source</a><a href="#impl-IntoBytes-for-Wrapping%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/num/wrapping/struct.Wrapping.html" title="struct core::num::wrapping::Wrapping">Wrapping</a>&lt;T&gt;</h3></section><section id="impl-IntoBytes-for-%5BT;+N%5D" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#905">Source</a><a href="#impl-IntoBytes-for-%5BT;+N%5D" class="anchor">§</a><h3 class="code-header">impl&lt;T: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>, const N: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">[T; N]</a></h3></section><section id="impl-IntoBytes-for-Cell%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#828">Source</a><a href="#impl-IntoBytes-for-Cell%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/cell/struct.Cell.html" title="struct core::cell::Cell">Cell</a>&lt;T&gt;</h3></section><section id="impl-IntoBytes-for-UnsafeCell%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#839">Source</a><a href="#impl-IntoBytes-for-UnsafeCell%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/cell/struct.UnsafeCell.html" title="struct core::cell::UnsafeCell">UnsafeCell</a>&lt;T&gt;</h3></section><section id="impl-IntoBytes-for-ManuallyDrop%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#738">Source</a><a href="#impl-IntoBytes-for-ManuallyDrop%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/mem/manually_drop/struct.ManuallyDrop.html" title="struct core::mem::manually_drop::ManuallyDrop">ManuallyDrop</a>&lt;T&gt;</h3></section><section id="impl-IntoBytes-for-PhantomData%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#656">Source</a><a href="#impl-IntoBytes-for-PhantomData%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T: ?<a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;T&gt;</h3></section><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-IntoBytes-for-F32%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#905-921">Source</a><a href="#impl-IntoBytes-for-F32%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.F32.html" title="struct zerocopy::byteorder::F32">F32</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">4</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-F64%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#922-938">Source</a><a href="#impl-IntoBytes-for-F64%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.F64.html" title="struct zerocopy::byteorder::F64">F64</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">8</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-I16%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#787-803">Source</a><a href="#impl-IntoBytes-for-I16%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.I16.html" title="struct zerocopy::byteorder::I16">I16</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">2</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-I32%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#804-820">Source</a><a href="#impl-IntoBytes-for-I32%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.I32.html" title="struct zerocopy::byteorder::I32">I32</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">4</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-I64%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#821-837">Source</a><a href="#impl-IntoBytes-for-I64%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.I64.html" title="struct zerocopy::byteorder::I64">I64</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">8</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-I128%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#838-854">Source</a><a href="#impl-IntoBytes-for-I128%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.I128.html" title="struct zerocopy::byteorder::I128">I128</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">16</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-Isize%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#855-871">Source</a><a href="#impl-IntoBytes-for-Isize%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.Isize.html" title="struct zerocopy::byteorder::Isize">Isize</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">8</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-U16%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#702-718">Source</a><a href="#impl-IntoBytes-for-U16%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.U16.html" title="struct zerocopy::byteorder::U16">U16</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">2</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-U32%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#719-735">Source</a><a href="#impl-IntoBytes-for-U32%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.U32.html" title="struct zerocopy::byteorder::U32">U32</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">4</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-U64%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#736-752">Source</a><a href="#impl-IntoBytes-for-U64%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.U64.html" title="struct zerocopy::byteorder::U64">U64</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">8</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-U128%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#753-769">Source</a><a href="#impl-IntoBytes-for-U128%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.U128.html" title="struct zerocopy::byteorder::U128">U128</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">16</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-Usize%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#770-786">Source</a><a href="#impl-IntoBytes-for-Usize%3CO%3E" class="anchor">§</a><h3 class="code-header">impl&lt;O&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="byteorder/struct.Usize.html" title="struct zerocopy::byteorder::Usize">Usize</a>&lt;O&gt;<div class="where">where
[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.array.html">8</a>]: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,
<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a>&lt;O&gt;: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section><section id="impl-IntoBytes-for-Unalign%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/wrappers.rs.html#114">Source</a><a href="#impl-IntoBytes-for-Unalign%3CT%3E" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a> for <a class="struct" href="struct.Unalign.html" title="struct zerocopy::Unalign">Unalign</a>&lt;T&gt;<div class="where">where
T: <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h3></section></div><script src="../trait.impl/zerocopy/trait.IntoBytes.js" data-ignore-extern-crates="core" async></script></section></div></main></body></html>