1053 lines
275 KiB
HTML
1053 lines
275 KiB
HTML
<!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 for which some bit patterns are valid."><title>TryFromBytes 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="#">TryFromBytes</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="#">TryFrom<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="#what-is-a-valid-instance" title="What is a “valid instance”?">What is a “valid instance”?</a></li><li><a href="#tryfrombytes-is-not-symmetrical-with-intobytes" title="`TryFromBytes` is not symmetrical with `IntoBytes`"><code>TryFromBytes</code> is not symmetrical with <code>IntoBytes</code></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.try_mut_from_bytes" title="try_mut_from_bytes">try_mut_from_bytes</a></li><li><a href="#method.try_mut_from_bytes_with_elems" title="try_mut_from_bytes_with_elems">try_mut_from_bytes_with_elems</a></li><li><a href="#method.try_mut_from_prefix" title="try_mut_from_prefix">try_mut_from_prefix</a></li><li><a href="#method.try_mut_from_prefix_with_elems" title="try_mut_from_prefix_with_elems">try_mut_from_prefix_with_elems</a></li><li><a href="#method.try_mut_from_suffix" title="try_mut_from_suffix">try_mut_from_suffix</a></li><li><a href="#method.try_mut_from_suffix_with_elems" title="try_mut_from_suffix_with_elems">try_mut_from_suffix_with_elems</a></li><li><a href="#method.try_read_from_bytes" title="try_read_from_bytes">try_read_from_bytes</a></li><li><a href="#method.try_read_from_prefix" title="try_read_from_prefix">try_read_from_prefix</a></li><li><a href="#method.try_read_from_suffix" title="try_read_from_suffix">try_read_from_suffix</a></li><li><a href="#method.try_ref_from_bytes" title="try_ref_from_bytes">try_ref_from_bytes</a></li><li><a href="#method.try_ref_from_bytes_with_elems" title="try_ref_from_bytes_with_elems">try_ref_from_bytes_with_elems</a></li><li><a href="#method.try_ref_from_prefix" title="try_ref_from_prefix">try_ref_from_prefix</a></li><li><a href="#method.try_ref_from_prefix_with_elems" title="try_ref_from_prefix_with_elems">try_ref_from_prefix_with_elems</a></li><li><a href="#method.try_ref_from_suffix" title="try_ref_from_suffix">try_ref_from_suffix</a></li><li><a href="#method.try_ref_from_suffix_with_elems" title="try_ref_from_suffix_with_elems">try_ref_from_suffix_with_elems</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-TryFromBytes-for-()" title="()">()</a></li><li><a href="#impl-TryFromBytes-for-(A,+B)" title="(A, B)">(A, B)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C)" title="(A, B, C)">(A, B, C)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D)" title="(A, B, C, D)">(A, B, C, D)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E)" title="(A, B, C, D, E)">(A, B, C, D, E)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F)" title="(A, B, C, D, E, F)">(A, B, C, D, E, F)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G)" title="(A, B, C, D, E, F, G)">(A, B, C, D, E, F, G)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H)" title="(A, B, C, D, E, F, G, H)">(A, B, C, D, E, F, G, H)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I)" title="(A, B, C, D, E, F, G, H, I)">(A, B, C, D, E, F, G, H, I)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)" title="(A, B, C, D, E, F, G, H, I, J)">(A, B, C, D, E, F, G, H, I, J)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)" title="(A, B, C, D, E, F, G, H, I, J, K)">(A, B, C, D, E, F, G, H, I, J, K)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)" title="(A, B, C, D, E, F, G, H, I, J, K, L)">(A, B, C, D, E, F, G, H, I, J, K, L)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M)">(A, B, C, D, E, F, G, H, I, J, K, L, M)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W,+X)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W,+X,+Y)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y)</a></li><li><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W,+X,+Y,+Z)" title="(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)</a></li><li><a href="#impl-TryFromBytes-for-(A,)" title="(A,)">(A,)</a></li><li><a href="#impl-TryFromBytes-for-*const+T" title="*const T">*const T</a></li><li><a href="#impl-TryFromBytes-for-*mut+T" title="*mut T">*mut T</a></li><li><a href="#impl-TryFromBytes-for-AtomicBool" title="AtomicBool">AtomicBool</a></li><li><a href="#impl-TryFromBytes-for-AtomicI8" title="AtomicI8">AtomicI8</a></li><li><a href="#impl-TryFromBytes-for-AtomicI16" title="AtomicI16">AtomicI16</a></li><li><a href="#impl-TryFromBytes-for-AtomicI32" title="AtomicI32">AtomicI32</a></li><li><a href="#impl-TryFromBytes-for-AtomicI64" title="AtomicI64">AtomicI64</a></li><li><a href="#impl-TryFromBytes-for-AtomicIsize" title="AtomicIsize">AtomicIsize</a></li><li><a href="#impl-TryFromBytes-for-AtomicPtr%3CT%3E" title="AtomicPtr<T>">AtomicPtr<T></a></li><li><a href="#impl-TryFromBytes-for-AtomicU8" title="AtomicU8">AtomicU8</a></li><li><a href="#impl-TryFromBytes-for-AtomicU16" title="AtomicU16">AtomicU16</a></li><li><a href="#impl-TryFromBytes-for-AtomicU32" title="AtomicU32">AtomicU32</a></li><li><a href="#impl-TryFromBytes-for-AtomicU64" title="AtomicU64">AtomicU64</a></li><li><a href="#impl-TryFromBytes-for-AtomicUsize" title="AtomicUsize">AtomicUsize</a></li><li><a href="#impl-TryFromBytes-for-Cell%3CT%3E" title="Cell<T>">Cell<T></a></li><li><a href="#impl-TryFromBytes-for-MaybeUninit%3CT%3E" title="CoreMaybeUninit<T>">CoreMaybeUninit<T></a></li><li><a href="#impl-TryFromBytes-for-ManuallyDrop%3CT%3E" title="ManuallyDrop<T>">ManuallyDrop<T></a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Ci8%3E" title="NonZeroI8">NonZeroI8</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Ci16%3E" title="NonZeroI16">NonZeroI16</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Ci32%3E" title="NonZeroI32">NonZeroI32</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Ci64%3E" title="NonZeroI64">NonZeroI64</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Ci128%3E" title="NonZeroI128">NonZeroI128</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Cisize%3E" title="NonZeroIsize">NonZeroIsize</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Cu8%3E" title="NonZeroU8">NonZeroU8</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Cu16%3E" title="NonZeroU16">NonZeroU16</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Cu32%3E" title="NonZeroU32">NonZeroU32</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Cu64%3E" title="NonZeroU64">NonZeroU64</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Cu128%3E" title="NonZeroU128">NonZeroU128</a></li><li><a href="#impl-TryFromBytes-for-NonZero%3Cusize%3E" title="NonZeroUsize">NonZeroUsize</a></li><li><a href="#impl-TryFromBytes-for-Option%3C%26T%3E" title="Option<&T>">Option<&T></a></li><li><a href="#impl-TryFromBytes-for-Option%3C%26mut+T%3E" title="Option<&mut T>">Option<&mut T></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonNull%3CT%3E%3E" title="Option<NonNull<T>>">Option<NonNull<T>></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci8%3E%3E" title="Option<NonZeroI8>">Option<NonZeroI8></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci16%3E%3E" title="Option<NonZeroI16>">Option<NonZeroI16></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci32%3E%3E" title="Option<NonZeroI32>">Option<NonZeroI32></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci64%3E%3E" title="Option<NonZeroI64>">Option<NonZeroI64></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci128%3E%3E" title="Option<NonZeroI128>">Option<NonZeroI128></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cisize%3E%3E" title="Option<NonZeroIsize>">Option<NonZeroIsize></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu8%3E%3E" title="Option<NonZeroU8>">Option<NonZeroU8></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu16%3E%3E" title="Option<NonZeroU16>">Option<NonZeroU16></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu32%3E%3E" title="Option<NonZeroU32>">Option<NonZeroU32></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu64%3E%3E" title="Option<NonZeroU64>">Option<NonZeroU64></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu128%3E%3E" title="Option<NonZeroU128>">Option<NonZeroU128></a></li><li><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cusize%3E%3E" title="Option<NonZeroUsize>">Option<NonZeroUsize></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn()+-%3E+M%3E" title="Option<extern "C" fn() -> M>">Option<extern "C" fn() -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> M>">Option<extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(B, C, D, E, F, G, H, I, J, K, L) -> M>">Option<extern "C" fn(B, C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(C, D, E, F, G, H, I, J, K, L) -> M>">Option<extern "C" fn(C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(D, E, F, G, H, I, J, K, L) -> M>">Option<extern "C" fn(D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(E, F, G, H, I, J, K, L) -> M>">Option<extern "C" fn(E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(F, G, H, I, J, K, L) -> M>">Option<extern "C" fn(F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(G, H, I, J, K, L) -> M>">Option<extern "C" fn(G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(H, I, J, K, L) -> M>">Option<extern "C" fn(H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(I,+J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(I, J, K, L) -> M>">Option<extern "C" fn(I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(J,+K,+L)+-%3E+M%3E" title="Option<extern "C" fn(J, K, L) -> M>">Option<extern "C" fn(J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(K,+L)+-%3E+M%3E" title="Option<extern "C" fn(K, L) -> M>">Option<extern "C" fn(K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(L)+-%3E+M%3E" title="Option<extern "C" fn(L) -> M>">Option<extern "C" fn(L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn()+-%3E+M%3E" title="Option<fn() -> M>">Option<fn() -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<fn(A, B, C, D, E, F, G, H, I, J, K, L) -> M>">Option<fn(A, B, C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<fn(B, C, D, E, F, G, H, I, J, K, L) -> M>">Option<fn(B, C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<fn(C, D, E, F, G, H, I, J, K, L) -> M>">Option<fn(C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<fn(D, E, F, G, H, I, J, K, L) -> M>">Option<fn(D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<fn(E, F, G, H, I, J, K, L) -> M>">Option<fn(E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<fn(F, G, H, I, J, K, L) -> M>">Option<fn(F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<fn(G, H, I, J, K, L) -> M>">Option<fn(G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<fn(H, I, J, K, L) -> M>">Option<fn(H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(I,+J,+K,+L)+-%3E+M%3E" title="Option<fn(I, J, K, L) -> M>">Option<fn(I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(J,+K,+L)+-%3E+M%3E" title="Option<fn(J, K, L) -> M>">Option<fn(J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(K,+L)+-%3E+M%3E" title="Option<fn(K, L) -> M>">Option<fn(K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cfn(L)+-%3E+M%3E" title="Option<fn(L) -> M>">Option<fn(L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn()+-%3E+M%3E" title="Option<unsafe extern "C" fn() -> M>">Option<unsafe extern "C" fn() -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> M>">Option<unsafe extern "C" fn(A, B, C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(B, C, D, E, F, G, H, I, J, K, L) -> M>">Option<unsafe extern "C" fn(B, C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(C, D, E, F, G, H, I, J, K, L) -> M>">Option<unsafe extern "C" fn(C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(D, E, F, G, H, I, J, K, L) -> M>">Option<unsafe extern "C" fn(D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(E, F, G, H, I, J, K, L) -> M>">Option<unsafe extern "C" fn(E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(F, G, H, I, J, K, L) -> M>">Option<unsafe extern "C" fn(F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(G, H, I, J, K, L) -> M>">Option<unsafe extern "C" fn(G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(H, I, J, K, L) -> M>">Option<unsafe extern "C" fn(H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(I, J, K, L) -> M>">Option<unsafe extern "C" fn(I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(J,+K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(J, K, L) -> M>">Option<unsafe extern "C" fn(J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(K,+L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(K, L) -> M>">Option<unsafe extern "C" fn(K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(L)+-%3E+M%3E" title="Option<unsafe extern "C" fn(L) -> M>">Option<unsafe extern "C" fn(L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn()+-%3E+M%3E" title="Option<unsafe fn() -> M>">Option<unsafe fn() -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(A, B, C, D, E, F, G, H, I, J, K, L) -> M>">Option<unsafe fn(A, B, C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(B, C, D, E, F, G, H, I, J, K, L) -> M>">Option<unsafe fn(B, C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(C, D, E, F, G, H, I, J, K, L) -> M>">Option<unsafe fn(C, D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(D, E, F, G, H, I, J, K, L) -> M>">Option<unsafe fn(D, E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(E, F, G, H, I, J, K, L) -> M>">Option<unsafe fn(E, F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(F, G, H, I, J, K, L) -> M>">Option<unsafe fn(F, G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(G, H, I, J, K, L) -> M>">Option<unsafe fn(G, H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(H,+I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(H, I, J, K, L) -> M>">Option<unsafe fn(H, I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(I,+J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(I, J, K, L) -> M>">Option<unsafe fn(I, J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(J,+K,+L)+-%3E+M%3E" title="Option<unsafe fn(J, K, L) -> M>">Option<unsafe fn(J, K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(K,+L)+-%3E+M%3E" title="Option<unsafe fn(K, L) -> M>">Option<unsafe fn(K, L) -> M></a></li><li><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(L)+-%3E+M%3E" title="Option<unsafe fn(L) -> M>">Option<unsafe fn(L) -> M></a></li><li><a href="#impl-TryFromBytes-for-PhantomData%3CT%3E" title="PhantomData<T>">PhantomData<T></a></li><li><a href="#impl-TryFromBytes-for-UnsafeCell%3CT%3E" title="UnsafeCell<T>">UnsafeCell<T></a></li><li><a href="#impl-TryFromBytes-for-Wrapping%3CT%3E" title="Wrapping<T>">Wrapping<T></a></li><li><a href="#impl-TryFromBytes-for-%5BT;+N%5D" title="[T; N]">[T; N]</a></li><li><a href="#impl-TryFromBytes-for-%5BT%5D" title="[T]">[T]</a></li><li><a href="#impl-TryFromBytes-for-__m128" title="__m128">__m128</a></li><li><a href="#impl-TryFromBytes-for-__m256" title="__m256">__m256</a></li><li><a href="#impl-TryFromBytes-for-__m512" title="__m512">__m512</a></li><li><a href="#impl-TryFromBytes-for-__m128d" title="__m128d">__m128d</a></li><li><a href="#impl-TryFromBytes-for-__m128i" title="__m128i">__m128i</a></li><li><a href="#impl-TryFromBytes-for-__m256d" title="__m256d">__m256d</a></li><li><a href="#impl-TryFromBytes-for-__m256i" title="__m256i">__m256i</a></li><li><a href="#impl-TryFromBytes-for-__m512bh" title="__m512bh">__m512bh</a></li><li><a href="#impl-TryFromBytes-for-__m512d" title="__m512d">__m512d</a></li><li><a href="#impl-TryFromBytes-for-__m512i" title="__m512i">__m512i</a></li><li><a href="#impl-TryFromBytes-for-bool" title="bool">bool</a></li><li><a href="#impl-TryFromBytes-for-char" title="char">char</a></li><li><a href="#impl-TryFromBytes-for-f32" title="f32">f32</a></li><li><a href="#impl-TryFromBytes-for-f64" title="f64">f64</a></li><li><a href="#impl-TryFromBytes-for-i8" title="i8">i8</a></li><li><a href="#impl-TryFromBytes-for-i16" title="i16">i16</a></li><li><a href="#impl-TryFromBytes-for-i32" title="i32">i32</a></li><li><a href="#impl-TryFromBytes-for-i64" title="i64">i64</a></li><li><a href="#impl-TryFromBytes-for-i128" title="i128">i128</a></li><li><a href="#impl-TryFromBytes-for-isize" title="isize">isize</a></li><li><a href="#impl-TryFromBytes-for-str" title="str">str</a></li><li><a href="#impl-TryFromBytes-for-u8" title="u8">u8</a></li><li><a href="#impl-TryFromBytes-for-u16" title="u16">u16</a></li><li><a href="#impl-TryFromBytes-for-u32" title="u32">u32</a></li><li><a href="#impl-TryFromBytes-for-u64" title="u64">u64</a></li><li><a href="#impl-TryFromBytes-for-u128" title="u128">u128</a></li><li><a href="#impl-TryFromBytes-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">TryFrom<wbr>Bytes</span> <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#1686-3056">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe trait TryFromBytes {
|
||
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 15 methods</span></summary> // Provided methods
|
||
fn <a href="#method.try_ref_from_bytes" class="fn">try_ref_from_bytes</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&Self, <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_ref_from_prefix" class="fn">try_ref_from_prefix</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&Self, &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_ref_from_suffix" class="fn">try_ref_from_suffix</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], &Self), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_mut_from_bytes" class="fn">try_mut_from_bytes</a>(
|
||
bytes: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&mut Self, <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_mut_from_prefix" class="fn">try_mut_from_prefix</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&mut Self, &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_mut_from_suffix" class="fn">try_mut_from_suffix</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], &mut Self), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_ref_from_bytes_with_elems" class="fn">try_ref_from_bytes_with_elems</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&Self, <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_ref_from_prefix_with_elems" class="fn">try_ref_from_prefix_with_elems</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&Self, &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_ref_from_suffix_with_elems" class="fn">try_ref_from_suffix_with_elems</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], &Self), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_mut_from_bytes_with_elems" class="fn">try_mut_from_bytes_with_elems</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&mut Self, <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_mut_from_prefix_with_elems" class="fn">try_mut_from_prefix_with_elems</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&mut Self, &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_mut_from_suffix_with_elems" class="fn">try_mut_from_suffix_with_elems</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], &mut Self), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_read_from_bytes" class="fn">try_read_from_bytes</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="type" href="error/type.TryReadError.html" title="type zerocopy::error::TryReadError">TryReadError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_read_from_prefix" class="fn">try_read_from_prefix</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(Self, &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryReadError.html" title="type zerocopy::error::TryReadError">TryReadError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.try_read_from_suffix" class="fn">try_read_from_suffix</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self), <a class="type" href="error/type.TryReadError.html" title="type zerocopy::error::TryReadError">TryReadError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Types for which some bit patterns are valid.</p>
|
||
<p>A memory region of the appropriate length which contains initialized bytes
|
||
can be viewed as a <code>TryFromBytes</code> type so long as the runtime value of those
|
||
bytes corresponds to a <a href="#what-is-a-valid-instance"><em>valid instance</em></a> of that type. For example,
|
||
<a href="https://doc.rust-lang.org/1.93.1/core/primitive.bool.html" title="primitive bool"><code>bool</code></a> is <code>TryFromBytes</code>, so zerocopy can transmute a <a href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html" title="primitive u8"><code>u8</code></a> into a
|
||
<a href="https://doc.rust-lang.org/1.93.1/core/primitive.bool.html" title="primitive bool"><code>bool</code></a> so long as it first checks that the value of the <a href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html" title="primitive u8"><code>u8</code></a> is <code>0</code> or
|
||
<code>1</code>.</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.TryFromBytes.html" title="derive zerocopy::TryFromBytes"><code>#[derive(TryFromBytes)]</code></a>; e.g.:</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#[derive(TryFromBytes)]
|
||
</span><span class="kw">struct </span>MyStruct {
|
||
...
|
||
}
|
||
|
||
<span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>MyEnum {
|
||
...
|
||
}
|
||
|
||
<span class="attr">#[derive(TryFromBytes, Immutable)]
|
||
</span><span class="kw">union </span>MyUnion {
|
||
...
|
||
}</code></pre></div>
|
||
<p>This derive ensures that the runtime check of whether bytes correspond to a
|
||
valid instance is sound. You <strong>must</strong> implement this trait via the derive.</p>
|
||
<h2 id="what-is-a-valid-instance"><a class="doc-anchor" href="#what-is-a-valid-instance">§</a>What is a “valid instance”?</h2>
|
||
<p>In Rust, each type has <em>bit validity</em>, which refers to the set of bit
|
||
patterns which may appear in an instance of that type. It is impossible for
|
||
safe Rust code to produce values which violate bit validity (ie, values
|
||
outside of the “valid” set of bit patterns). If <code>unsafe</code> code produces an
|
||
invalid value, this is considered <a href="https://raphlinus.github.io/programming/rust/2018/08/17/undefined-behavior.html">undefined behavior</a>.</p>
|
||
<p>Rust’s bit validity rules are currently being decided, which means that some
|
||
types have three classes of bit patterns: those which are definitely valid,
|
||
and whose validity is documented in the language; those which may or may not
|
||
be considered valid at some point in the future; and those which are
|
||
definitely invalid.</p>
|
||
<p>Zerocopy takes a conservative approach, and only considers a bit pattern to
|
||
be valid if its validity is a documented guarantee provided by the
|
||
language.</p>
|
||
<p>For most use cases, Rust’s current guarantees align with programmers’
|
||
intuitions about what ought to be valid. As a result, zerocopy’s
|
||
conservatism should not affect most users.</p>
|
||
<p>If you are negatively affected by lack of support for a particular type,
|
||
we encourage you to let us know by <a href="https://github.com/google/zerocopy">filing an issue</a>.</p>
|
||
<h2 id="tryfrombytes-is-not-symmetrical-with-intobytes"><a class="doc-anchor" href="#tryfrombytes-is-not-symmetrical-with-intobytes">§</a><code>TryFromBytes</code> is not symmetrical with <a href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes"><code>IntoBytes</code></a></h2>
|
||
<p>There are some types which implement both <code>TryFromBytes</code> and <a href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes"><code>IntoBytes</code></a>,
|
||
but for which <code>TryFromBytes</code> is not guaranteed to accept all byte sequences
|
||
produced by <code>IntoBytes</code>. In other words, for some <code>T: TryFromBytes + IntoBytes</code>, there exist values of <code>t: T</code> such that
|
||
<code>TryFromBytes::try_ref_from_bytes(t.as_bytes()) == None</code>. Code should not
|
||
generally assume that values produced by <code>IntoBytes</code> will necessarily be
|
||
accepted as valid by <code>TryFromBytes</code>.</p>
|
||
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
|
||
<p>On its own, <code>T: TryFromBytes</code> does not make any guarantees about the layout
|
||
or representation of <code>T</code>. It merely provides the ability to perform a
|
||
validity check at runtime via methods like <a href="trait.TryFromBytes.html#method.try_ref_from_bytes" title="associated function zerocopy::TryFromBytes::try_ref_from_bytes"><code>try_ref_from_bytes</code></a>.</p>
|
||
<p>You must not rely on the <code>#[doc(hidden)]</code> internals of <code>TryFromBytes</code>.
|
||
Future releases of zerocopy may make backwards-breaking changes to these
|
||
items, including changes that only affect soundness, which may cause code
|
||
which uses those items to silently become unsound.</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.try_ref_from_bytes" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#1795-1814">Source</a><h4 class="code-header">fn <a href="#method.try_ref_from_bytes" class="fn">try_ref_from_bytes</a>(source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&Self, <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the given <code>source</code> as a <code>&Self</code>.</p>
|
||
<p>If the bytes of <code>source</code> are a valid instance of <code>Self</code>, this method
|
||
returns a reference to those bytes interpreted as a <code>Self</code>. If the
|
||
length of <code>source</code> is not a <a href="trait.KnownLayout.html#what-is-a-valid-size" title="trait zerocopy::KnownLayout">valid size of <code>Self</code></a>, or if
|
||
<code>source</code> is not appropriately aligned, or if <code>source</code> is not a valid
|
||
instance of <code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>, you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment
|
||
error</a>.</p>
|
||
<p><code>Self</code> may be a sized type, a slice, or a <a href="trait.KnownLayout.html#dynamically-sized-types" title="trait zerocopy::KnownLayout">slice DST</a>.</p>
|
||
<h5 id="compile-time-assertions"><a class="doc-anchor" href="#compile-time-assertions">§</a>Compile-Time Assertions</h5>
|
||
<p>This method cannot yet be used on unsized types whose dynamically-sized
|
||
component is zero-sized. Attempting to use this method on such types
|
||
results in a compile-time assertion error; e.g.:</p>
|
||
|
||
<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, Immutable, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: u16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let _ </span>= ZSTy::try_ref_from_bytes(<span class="number">0u16</span>.as_bytes()); <span class="comment">// ⚠ Compile Error!</span></code></pre></div><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::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the byte sequence `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="kw">let </span>packet = Packet::try_ref_from_bytes(bytes).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0x10</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="macro">assert!</span>(Packet::try_ref_from_bytes(bytes).is_err());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_ref_from_prefix" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#1894-1900">Source</a><h4 class="code-header">fn <a href="#method.try_ref_from_prefix" class="fn">try_ref_from_prefix</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&Self, &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the prefix of the given <code>source</code> as a <code>&Self</code>.</p>
|
||
<p>This method computes the <a href="trait.KnownLayout.html#what-is-a-valid-size" title="trait zerocopy::KnownLayout">largest possible size of <code>Self</code></a>
|
||
that can fit in the leading bytes of <code>source</code>. If that prefix is a valid
|
||
instance of <code>Self</code>, this method returns a reference to those bytes
|
||
interpreted as <code>Self</code>, and a reference to the remaining bytes. If there
|
||
are insufficient bytes, or if <code>source</code> is not appropriately aligned, or
|
||
if those bytes are not a valid instance of <code>Self</code>, this returns <code>Err</code>.
|
||
If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>, you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the
|
||
alignment error</a>.</p>
|
||
<p><code>Self</code> may be a sized type, a slice, or a <a href="trait.KnownLayout.html#dynamically-sized-types" title="trait zerocopy::KnownLayout">slice DST</a>.</p>
|
||
<h5 id="compile-time-assertions-1"><a class="doc-anchor" href="#compile-time-assertions-1">§</a>Compile-Time Assertions</h5>
|
||
<p>This method cannot yet be used on unsized types whose dynamically-sized
|
||
component is zero-sized. Attempting to use this method on such types
|
||
results in a compile-time assertion error; e.g.:</p>
|
||
|
||
<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, Immutable, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: u16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let _ </span>= ZSTy::try_ref_from_prefix(<span class="number">0u16</span>.as_bytes()); <span class="comment">// ⚠ Compile Error!</span></code></pre></div><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::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="comment">// These are more bytes than are needed to encode a `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="kw">let </span>(packet, suffix) = Packet::try_ref_from_prefix(bytes).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="macro">assert_eq!</span>(suffix, <span class="kw-2">&</span>[<span class="number">6u8</span>][..]);
|
||
|
||
<span class="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0x10</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="macro">assert!</span>(Packet::try_ref_from_prefix(bytes).is_err());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_ref_from_suffix" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#1980-1986">Source</a><h4 class="code-header">fn <a href="#method.try_ref_from_suffix" class="fn">try_ref_from_suffix</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], &Self), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the suffix of the given <code>source</code> as a <code>&Self</code>.</p>
|
||
<p>This method computes the <a href="trait.KnownLayout.html#what-is-a-valid-size" title="trait zerocopy::KnownLayout">largest possible size of <code>Self</code></a>
|
||
that can fit in the trailing bytes of <code>source</code>. If that suffix is a
|
||
valid instance of <code>Self</code>, this method returns a reference to those bytes
|
||
interpreted as <code>Self</code>, and a reference to the preceding bytes. If there
|
||
are insufficient bytes, or if the suffix of <code>source</code> would not be
|
||
appropriately aligned, or if the suffix is not a valid instance of
|
||
<code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>, you
|
||
can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment error</a>.</p>
|
||
<p><code>Self</code> may be a sized type, a slice, or a <a href="trait.KnownLayout.html#dynamically-sized-types" title="trait zerocopy::KnownLayout">slice DST</a>.</p>
|
||
<h5 id="compile-time-assertions-2"><a class="doc-anchor" href="#compile-time-assertions-2">§</a>Compile-Time Assertions</h5>
|
||
<p>This method cannot yet be used on unsized types whose dynamically-sized
|
||
component is zero-sized. Attempting to use this method on such types
|
||
results in a compile-time assertion error; e.g.:</p>
|
||
|
||
<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, Immutable, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: u16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let _ </span>= ZSTy::try_ref_from_suffix(<span class="number">0u16</span>.as_bytes()); <span class="comment">// ⚠ Compile Error!</span></code></pre></div><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::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="comment">// These are more bytes than are needed to encode a `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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>(prefix, packet) = Packet::try_ref_from_suffix(bytes).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="macro">assert_eq!</span>(prefix, <span class="kw-2">&</span>[<span class="number">0u8</span>][..]);
|
||
|
||
<span class="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</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">77</span>, <span class="number">240</span>, <span class="number">0xC0</span>, <span class="number">0x10</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_ref_from_suffix(bytes).is_err());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_mut_from_bytes" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2069-2086">Source</a><h4 class="code-header">fn <a href="#method.try_mut_from_bytes" class="fn">try_mut_from_bytes</a>(
|
||
bytes: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&mut Self, <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the given <code>source</code> as a <code>&mut Self</code> without
|
||
copying.</p>
|
||
<p>If the bytes of <code>source</code> are a valid instance of <code>Self</code>, this method
|
||
returns a reference to those bytes interpreted as a <code>Self</code>. If the
|
||
length of <code>source</code> is not a <a href="trait.KnownLayout.html#what-is-a-valid-size" title="trait zerocopy::KnownLayout">valid size of <code>Self</code></a>, or if
|
||
<code>source</code> is not appropriately aligned, or if <code>source</code> is not a valid
|
||
instance of <code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>, you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment
|
||
error</a>.</p>
|
||
<p><code>Self</code> may be a sized type, a slice, or a <a href="trait.KnownLayout.html#dynamically-sized-types" title="trait zerocopy::KnownLayout">slice DST</a>.</p>
|
||
<h5 id="compile-time-assertions-3"><a class="doc-anchor" href="#compile-time-assertions-3">§</a>Compile-Time Assertions</h5>
|
||
<p>This method cannot yet be used on unsized types whose dynamically-sized
|
||
component is zero-sized. Attempting to use this method on such types
|
||
results in a compile-time assertion error; e.g.:</p>
|
||
|
||
<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: [u8; <span class="number">2</span>],
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>source = [<span class="number">85</span>, <span class="number">85</span>];
|
||
<span class="kw">let _ </span>= ZSTy::try_mut_from_bytes(<span class="kw-2">&mut </span>source[..]); <span class="comment">// ⚠ Compile Error!</span></code></pre></div><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::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="kw">let </span>bytes = <span class="kw-2">&mut </span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="kw">let </span>packet = Packet::try_mut_from_bytes(bytes).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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>]]);
|
||
|
||
packet.temperature = <span class="number">111</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(bytes, [<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">111</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="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </span>[<span class="number">0x10</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="macro">assert!</span>(Packet::try_mut_from_bytes(bytes).is_err());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_mut_from_prefix" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2173-2181">Source</a><h4 class="code-header">fn <a href="#method.try_mut_from_prefix" class="fn">try_mut_from_prefix</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&mut Self, &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the prefix of the given <code>source</code> as a <code>&mut Self</code>.</p>
|
||
<p>This method computes the <a href="trait.KnownLayout.html#what-is-a-valid-size" title="trait zerocopy::KnownLayout">largest possible size of <code>Self</code></a>
|
||
that can fit in the leading bytes of <code>source</code>. If that prefix is a valid
|
||
instance of <code>Self</code>, this method returns a reference to those bytes
|
||
interpreted as <code>Self</code>, and a reference to the remaining bytes. If there
|
||
are insufficient bytes, or if <code>source</code> is not appropriately aligned, or
|
||
if the bytes are not a valid instance of <code>Self</code>, this returns <code>Err</code>. If
|
||
<a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>, you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the
|
||
alignment error</a>.</p>
|
||
<p><code>Self</code> may be a sized type, a slice, or a <a href="trait.KnownLayout.html#dynamically-sized-types" title="trait zerocopy::KnownLayout">slice DST</a>.</p>
|
||
<h5 id="compile-time-assertions-4"><a class="doc-anchor" href="#compile-time-assertions-4">§</a>Compile-Time Assertions</h5>
|
||
<p>This method cannot yet be used on unsized types whose dynamically-sized
|
||
component is zero-sized. Attempting to use this method on such types
|
||
results in a compile-time assertion error; e.g.:</p>
|
||
|
||
<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: [u8; <span class="number">2</span>],
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>source = [<span class="number">85</span>, <span class="number">85</span>];
|
||
<span class="kw">let _ </span>= ZSTy::try_mut_from_prefix(<span class="kw-2">&mut </span>source[..]); <span class="comment">// ⚠ Compile Error!</span></code></pre></div><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::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="comment">// These are more bytes than are needed to encode a `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="kw">let </span>(packet, suffix) = Packet::try_mut_from_prefix(bytes).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="macro">assert_eq!</span>(suffix, <span class="kw-2">&</span>[<span class="number">6u8</span>][..]);
|
||
|
||
packet.temperature = <span class="number">111</span>;
|
||
suffix[<span class="number">0</span>] = <span class="number">222</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(bytes, [<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">111</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">222</span>]);
|
||
|
||
<span class="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </span>[<span class="number">0x10</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="macro">assert!</span>(Packet::try_mut_from_prefix(bytes).is_err());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_mut_from_suffix" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2268-2276">Source</a><h4 class="code-header">fn <a href="#method.try_mut_from_suffix" class="fn">try_mut_from_suffix</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], &mut Self), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the suffix of the given <code>source</code> as a <code>&mut Self</code>.</p>
|
||
<p>This method computes the <a href="trait.KnownLayout.html#what-is-a-valid-size" title="trait zerocopy::KnownLayout">largest possible size of <code>Self</code></a>
|
||
that can fit in the trailing bytes of <code>source</code>. If that suffix is a
|
||
valid instance of <code>Self</code>, this method returns a reference to those bytes
|
||
interpreted as <code>Self</code>, and a reference to the preceding bytes. If there
|
||
are insufficient bytes, or if the suffix of <code>source</code> would not be
|
||
appropriately aligned, or if the suffix is not a valid instance of
|
||
<code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>, you
|
||
can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment error</a>.</p>
|
||
<p><code>Self</code> may be a sized type, a slice, or a <a href="trait.KnownLayout.html#dynamically-sized-types" title="trait zerocopy::KnownLayout">slice DST</a>.</p>
|
||
<h5 id="compile-time-assertions-5"><a class="doc-anchor" href="#compile-time-assertions-5">§</a>Compile-Time Assertions</h5>
|
||
<p>This method cannot yet be used on unsized types whose dynamically-sized
|
||
component is zero-sized. Attempting to use this method on such types
|
||
results in a compile-time assertion error; e.g.:</p>
|
||
|
||
<div class="example-wrap compile_fail"><a href="#" class="tooltip" title="This example deliberately fails to compile">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: u16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>source = [<span class="number">85</span>, <span class="number">85</span>];
|
||
<span class="kw">let _ </span>= ZSTy::try_mut_from_suffix(<span class="kw-2">&mut </span>source[..]); <span class="comment">// ⚠ Compile Error!</span></code></pre></div><h5 id="examples-5"><a class="doc-anchor" href="#examples-5">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="comment">// These are more bytes than are needed to encode a `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </span>[<span class="number">0</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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>(prefix, packet) = Packet::try_mut_from_suffix(bytes).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="macro">assert_eq!</span>(prefix, <span class="kw-2">&</span>[<span class="number">0u8</span>][..]);
|
||
|
||
prefix[<span class="number">0</span>] = <span class="number">111</span>;
|
||
packet.temperature = <span class="number">222</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(bytes, [<span class="number">111</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">222</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="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </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">77</span>, <span class="number">240</span>, <span class="number">0xC0</span>, <span class="number">0x10</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_mut_from_suffix(bytes).is_err());</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_ref_from_bytes_with_elems" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2354-2376">Source</a><h4 class="code-header">fn <a href="#method.try_ref_from_bytes_with_elems" class="fn">try_ref_from_bytes_with_elems</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&Self, <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the given <code>source</code> as a <code>&Self</code> with a DST length
|
||
equal to <code>count</code>.</p>
|
||
<p>This method attempts to return a reference to <code>source</code> interpreted as a
|
||
<code>Self</code> with <code>count</code> trailing elements. If the length of <code>source</code> is not
|
||
equal to the size of <code>Self</code> with <code>count</code> elements, if <code>source</code> is not
|
||
appropriately aligned, or if <code>source</code> does not contain a valid instance
|
||
of <code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>,
|
||
you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment error</a>.</p>
|
||
<h5 id="examples-6"><a class="doc-anchor" href="#examples-6">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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>packet = Packet::try_ref_from_bytes_with_elems(bytes, <span class="number">3</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</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">77</span>, <span class="number">240</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_ref_from_bytes_with_elems(bytes, <span class="number">3</span>).is_err());</code></pre></div>
|
||
<p>Since an explicit <code>count</code> is provided, this method supports types with
|
||
zero-sized trailing slice elements. Methods such as <a href="trait.TryFromBytes.html#method.try_ref_from_bytes" title="associated function zerocopy::TryFromBytes::try_ref_from_bytes"><code>try_ref_from_bytes</code></a>
|
||
which do not take an explicit count do not support such types.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>core::num::NonZeroU16;
|
||
<span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, Immutable, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: NonZeroU16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let </span>src = <span class="number">0xCAFEu16</span>.as_bytes();
|
||
<span class="kw">let </span>zsty = ZSTy::try_ref_from_bytes_with_elems(src, <span class="number">42</span>).unwrap();
|
||
<span class="macro">assert_eq!</span>(zsty.trailing_dst.len(), <span class="number">42</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_ref_from_prefix_with_elems" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2456-2464">Source</a><h4 class="code-header">fn <a href="#method.try_ref_from_prefix_with_elems" class="fn">try_ref_from_prefix_with_elems</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&Self, &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the prefix of the given <code>source</code> as a <code>&Self</code> with
|
||
a DST length equal to <code>count</code>.</p>
|
||
<p>This method attempts to return a reference to the prefix of <code>source</code>
|
||
interpreted as a <code>Self</code> with <code>count</code> trailing elements, and a reference
|
||
to the remaining bytes. If the length of <code>source</code> is less than the size
|
||
of <code>Self</code> with <code>count</code> elements, if <code>source</code> is not appropriately
|
||
aligned, or if the prefix of <code>source</code> does not contain a valid instance
|
||
of <code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>,
|
||
you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment error</a>.</p>
|
||
<h5 id="examples-7"><a class="doc-anchor" href="#examples-7">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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">8</span>][..];
|
||
|
||
<span class="kw">let </span>(packet, suffix) = Packet::try_ref_from_prefix_with_elems(bytes, <span class="number">3</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="macro">assert_eq!</span>(suffix, <span class="kw-2">&</span>[<span class="number">8u8</span>][..]);
|
||
|
||
<span class="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </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="number">8</span>, <span class="number">77</span>, <span class="number">240</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_ref_from_prefix_with_elems(bytes, <span class="number">3</span>).is_err());</code></pre></div>
|
||
<p>Since an explicit <code>count</code> is provided, this method supports types with
|
||
zero-sized trailing slice elements. Methods such as <a href="trait.TryFromBytes.html#method.try_ref_from_prefix" title="associated function zerocopy::TryFromBytes::try_ref_from_prefix"><code>try_ref_from_prefix</code></a>
|
||
which do not take an explicit count do not support such types.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>core::num::NonZeroU16;
|
||
<span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, Immutable, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: NonZeroU16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let </span>src = <span class="number">0xCAFEu16</span>.as_bytes();
|
||
<span class="kw">let </span>(zsty, <span class="kw">_</span>) = ZSTy::try_ref_from_prefix_with_elems(src, <span class="number">42</span>).unwrap();
|
||
<span class="macro">assert_eq!</span>(zsty.trailing_dst.len(), <span class="number">42</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_ref_from_suffix_with_elems" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2545-2553">Source</a><h4 class="code-header">fn <a href="#method.try_ref_from_suffix_with_elems" class="fn">try_ref_from_suffix_with_elems</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], &Self), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.Immutable.html" title="trait zerocopy::Immutable">Immutable</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the suffix of the given <code>source</code> as a <code>&Self</code> with
|
||
a DST length equal to <code>count</code>.</p>
|
||
<p>This method attempts to return a reference to the suffix of <code>source</code>
|
||
interpreted as a <code>Self</code> with <code>count</code> trailing elements, and a reference
|
||
to the preceding bytes. If the length of <code>source</code> is less than the size
|
||
of <code>Self</code> with <code>count</code> elements, if the suffix of <code>source</code> is not
|
||
appropriately aligned, or if the suffix of <code>source</code> does not contain a
|
||
valid instance of <code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>, you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment
|
||
error</a>.</p>
|
||
<h5 id="examples-8"><a class="doc-anchor" href="#examples-8">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, KnownLayout, Immutable)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">123</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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>(prefix, packet) = Packet::try_ref_from_suffix_with_elems(bytes, <span class="number">3</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="macro">assert_eq!</span>(prefix, <span class="kw-2">&</span>[<span class="number">123u8</span>][..]);
|
||
|
||
<span class="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</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="number">8</span>, <span class="number">77</span>, <span class="number">240</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_ref_from_suffix_with_elems(bytes, <span class="number">3</span>).is_err());</code></pre></div>
|
||
<p>Since an explicit <code>count</code> is provided, this method supports types with
|
||
zero-sized trailing slice elements. Methods such as <a href="trait.TryFromBytes.html#method.try_ref_from_prefix" title="associated function zerocopy::TryFromBytes::try_ref_from_prefix"><code>try_ref_from_prefix</code></a>
|
||
which do not take an explicit count do not support such types.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>core::num::NonZeroU16;
|
||
<span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, Immutable, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: NonZeroU16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let </span>src = <span class="number">0xCAFEu16</span>.as_bytes();
|
||
<span class="kw">let </span>(<span class="kw">_</span>, zsty) = ZSTy::try_ref_from_suffix_with_elems(src, <span class="number">42</span>).unwrap();
|
||
<span class="macro">assert_eq!</span>(zsty.trailing_dst.len(), <span class="number">42</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_mut_from_bytes_with_elems" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2636-2656">Source</a><h4 class="code-header">fn <a href="#method.try_mut_from_bytes_with_elems" class="fn">try_mut_from_bytes_with_elems</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><&mut Self, <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the given <code>source</code> as a <code>&mut Self</code> with a DST
|
||
length equal to <code>count</code>.</p>
|
||
<p>This method attempts to return a reference to <code>source</code> interpreted as a
|
||
<code>Self</code> with <code>count</code> trailing elements. If the length of <code>source</code> is not
|
||
equal to the size of <code>Self</code> with <code>count</code> elements, if <code>source</code> is not
|
||
appropriately aligned, or if <code>source</code> does not contain a valid instance
|
||
of <code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>,
|
||
you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment error</a>.</p>
|
||
<h5 id="examples-9"><a class="doc-anchor" href="#examples-9">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="kw">let </span>bytes = <span class="kw-2">&mut </span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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>packet = Packet::try_mut_from_bytes_with_elems(bytes, <span class="number">3</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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>]]);
|
||
|
||
packet.temperature = <span class="number">111</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(bytes, [<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">111</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="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </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">77</span>, <span class="number">240</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_mut_from_bytes_with_elems(bytes, <span class="number">3</span>).is_err());</code></pre></div>
|
||
<p>Since an explicit <code>count</code> is provided, this method supports types with
|
||
zero-sized trailing slice elements. Methods such as <a href="trait.TryFromBytes.html#method.try_mut_from_bytes" title="associated function zerocopy::TryFromBytes::try_mut_from_bytes"><code>try_mut_from_bytes</code></a>
|
||
which do not take an explicit count do not support such types.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>core::num::NonZeroU16;
|
||
<span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: NonZeroU16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>src = <span class="number">0xCAFEu16</span>;
|
||
<span class="kw">let </span>src = src.as_mut_bytes();
|
||
<span class="kw">let </span>zsty = ZSTy::try_mut_from_bytes_with_elems(src, <span class="number">42</span>).unwrap();
|
||
<span class="macro">assert_eq!</span>(zsty.trailing_dst.len(), <span class="number">42</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_mut_from_prefix_with_elems" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2742-2750">Source</a><h4 class="code-header">fn <a href="#method.try_mut_from_prefix_with_elems" class="fn">try_mut_from_prefix_with_elems</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&mut Self, &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the prefix of the given <code>source</code> as a <code>&mut Self</code>
|
||
with a DST length equal to <code>count</code>.</p>
|
||
<p>This method attempts to return a reference to the prefix of <code>source</code>
|
||
interpreted as a <code>Self</code> with <code>count</code> trailing elements, and a reference
|
||
to the remaining bytes. If the length of <code>source</code> is less than the size
|
||
of <code>Self</code> with <code>count</code> elements, if <code>source</code> is not appropriately
|
||
aligned, or if the prefix of <code>source</code> does not contain a valid instance
|
||
of <code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>,
|
||
you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment error</a>.</p>
|
||
<h5 id="examples-10"><a class="doc-anchor" href="#examples-10">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="kw">let </span>bytes = <span class="kw-2">&mut </span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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">8</span>][..];
|
||
|
||
<span class="kw">let </span>(packet, suffix) = Packet::try_mut_from_prefix_with_elems(bytes, <span class="number">3</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="macro">assert_eq!</span>(suffix, <span class="kw-2">&</span>[<span class="number">8u8</span>][..]);
|
||
|
||
packet.temperature = <span class="number">111</span>;
|
||
suffix[<span class="number">0</span>] = <span class="number">222</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(bytes, [<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">111</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">222</span>]);
|
||
|
||
<span class="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </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="number">8</span>, <span class="number">77</span>, <span class="number">240</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_mut_from_prefix_with_elems(bytes, <span class="number">3</span>).is_err());</code></pre></div>
|
||
<p>Since an explicit <code>count</code> is provided, this method supports types with
|
||
zero-sized trailing slice elements. Methods such as <a href="trait.TryFromBytes.html#method.try_mut_from_prefix" title="associated function zerocopy::TryFromBytes::try_mut_from_prefix"><code>try_mut_from_prefix</code></a>
|
||
which do not take an explicit count do not support such types.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>core::num::NonZeroU16;
|
||
<span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: NonZeroU16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>src = <span class="number">0xCAFEu16</span>;
|
||
<span class="kw">let </span>src = src.as_mut_bytes();
|
||
<span class="kw">let </span>(zsty, <span class="kw">_</span>) = ZSTy::try_mut_from_prefix_with_elems(src, <span class="number">42</span>).unwrap();
|
||
<span class="macro">assert_eq!</span>(zsty.trailing_dst.len(), <span class="number">42</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_mut_from_suffix_with_elems" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2837-2845">Source</a><h4 class="code-header">fn <a href="#method.try_mut_from_suffix_with_elems" class="fn">try_mut_from_suffix_with_elems</a>(
|
||
source: &mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
count: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], &mut Self), <a class="type" href="error/type.TryCastError.html" title="type zerocopy::error::TryCastError">TryCastError</a><&mut [<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="trait.KnownLayout.html" title="trait zerocopy::KnownLayout">KnownLayout</a><PointerMetadata = <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> + <a class="trait" href="trait.IntoBytes.html" title="trait zerocopy::IntoBytes">IntoBytes</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to interpret the suffix of the given <code>source</code> as a <code>&mut Self</code>
|
||
with a DST length equal to <code>count</code>.</p>
|
||
<p>This method attempts to return a reference to the suffix of <code>source</code>
|
||
interpreted as a <code>Self</code> with <code>count</code> trailing elements, and a reference
|
||
to the preceding bytes. If the length of <code>source</code> is less than the size
|
||
of <code>Self</code> with <code>count</code> elements, if the suffix of <code>source</code> is not
|
||
appropriately aligned, or if the suffix of <code>source</code> does not contain a
|
||
valid instance of <code>Self</code>, this returns <code>Err</code>. If <a href="trait.Unaligned.html" title="trait zerocopy::Unaligned"><code>Self: Unaligned</code></a>, you can <a href="error/enum.ConvertError.html#method.from" title="associated function zerocopy::error::ConvertError::from">infallibly discard the alignment
|
||
error</a>.</p>
|
||
<h5 id="examples-11"><a class="doc-anchor" href="#examples-11">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
marshmallows: [[u8; <span class="number">2</span>]],
|
||
}
|
||
|
||
<span class="kw">let </span>bytes = <span class="kw-2">&mut </span>[<span class="number">123</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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>(prefix, packet) = Packet::try_mut_from_suffix_with_elems(bytes, <span class="number">3</span>).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(packet.marshmallows, [[<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="macro">assert_eq!</span>(prefix, <span class="kw-2">&</span>[<span class="number">123u8</span>][..]);
|
||
|
||
prefix[<span class="number">0</span>] = <span class="number">111</span>;
|
||
packet.temperature = <span class="number">222</span>;
|
||
|
||
<span class="macro">assert_eq!</span>(bytes, [<span class="number">111</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">222</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="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </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="number">8</span>, <span class="number">77</span>, <span class="number">240</span>, <span class="number">0xC0</span>, <span class="number">0xC0</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_mut_from_suffix_with_elems(bytes, <span class="number">3</span>).is_err());</code></pre></div>
|
||
<p>Since an explicit <code>count</code> is provided, this method supports types with
|
||
zero-sized trailing slice elements. Methods such as <a href="trait.TryFromBytes.html#method.try_mut_from_prefix" title="associated function zerocopy::TryFromBytes::try_mut_from_prefix"><code>try_mut_from_prefix</code></a>
|
||
which do not take an explicit count do not support such types.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>core::num::NonZeroU16;
|
||
<span class="kw">use </span>zerocopy::<span class="kw-2">*</span>;
|
||
|
||
<span class="attr">#[derive(TryFromBytes, IntoBytes, KnownLayout)]
|
||
#[repr(C, packed)]
|
||
</span><span class="kw">struct </span>ZSTy {
|
||
leading_sized: NonZeroU16,
|
||
trailing_dst: [()],
|
||
}
|
||
|
||
<span class="kw">let </span><span class="kw-2">mut </span>src = <span class="number">0xCAFEu16</span>;
|
||
<span class="kw">let </span>src = src.as_mut_bytes();
|
||
<span class="kw">let </span>(<span class="kw">_</span>, zsty) = ZSTy::try_mut_from_suffix_with_elems(src, <span class="number">42</span>).unwrap();
|
||
<span class="macro">assert_eq!</span>(zsty.trailing_dst.len(), <span class="number">42</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.try_read_from_bytes" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2897-2912">Source</a><h4 class="code-header">fn <a href="#method.try_read_from_bytes" class="fn">try_read_from_bytes</a>(source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="type" href="error/type.TryReadError.html" title="type zerocopy::error::TryReadError">TryReadError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to read the given <code>source</code> as a <code>Self</code>.</p>
|
||
<p>If <code>source.len() != size_of::<Self>()</code> or the bytes are not a valid
|
||
instance of <code>Self</code>, this returns <code>Err</code>.</p>
|
||
<h5 id="examples-12"><a class="doc-anchor" href="#examples-12">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
}
|
||
|
||
<span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</span>][..];
|
||
|
||
<span class="kw">let </span>packet = Packet::try_read_from_bytes(bytes).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
|
||
<span class="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&mut </span>[<span class="number">0x10</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_read_from_bytes(bytes).is_err());</code></pre></div><h5 id="performance-considerations"><a class="doc-anchor" href="#performance-considerations">§</a>Performance Considerations</h5>
|
||
<p>In this version of zerocopy, this method reads the <code>source</code> into a
|
||
well-aligned stack allocation and <em>then</em> validates that the allocation
|
||
is a valid <code>Self</code>. This ensures that validation can be performed using
|
||
aligned reads (which carry a performance advantage over unaligned reads
|
||
on many platforms) at the cost of an unconditional copy.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_read_from_prefix" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#2968-2983">Source</a><h4 class="code-header">fn <a href="#method.try_read_from_prefix" class="fn">try_read_from_prefix</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(Self, &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>]), <a class="type" href="error/type.TryReadError.html" title="type zerocopy::error::TryReadError">TryReadError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to read a <code>Self</code> from the prefix of the given <code>source</code>.</p>
|
||
<p>This attempts to read a <code>Self</code> from the first <code>size_of::<Self>()</code> bytes
|
||
of <code>source</code>, returning that <code>Self</code> and any remaining bytes. If
|
||
<code>source.len() < size_of::<Self>()</code> or the bytes are not a valid instance
|
||
of <code>Self</code>, it returns <code>Err</code>.</p>
|
||
<h5 id="examples-13"><a class="doc-anchor" href="#examples-13">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
}
|
||
|
||
<span class="comment">// These are more bytes than are needed to encode a `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="kw">let </span>(packet, suffix) = Packet::try_read_from_prefix(bytes).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(suffix, <span class="kw-2">&</span>[<span class="number">0u8</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="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</span>[<span class="number">0x10</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</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="macro">assert!</span>(Packet::try_read_from_prefix(bytes).is_err());</code></pre></div><h5 id="performance-considerations-1"><a class="doc-anchor" href="#performance-considerations-1">§</a>Performance Considerations</h5>
|
||
<p>In this version of zerocopy, this method reads the <code>source</code> into a
|
||
well-aligned stack allocation and <em>then</em> validates that the allocation
|
||
is a valid <code>Self</code>. This ensures that validation can be performed using
|
||
aligned reads (which carry a performance advantage over unaligned reads
|
||
on many platforms) at the cost of an unconditional copy.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.try_read_from_suffix" class="method"><a class="src rightside" href="../src/zerocopy/lib.rs.html#3040-3055">Source</a><h4 class="code-header">fn <a href="#method.try_read_from_suffix" class="fn">try_read_from_suffix</a>(
|
||
source: &[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>],
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><(&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self), <a class="type" href="error/type.TryReadError.html" title="type zerocopy::error::TryReadError">TryReadError</a><&[<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.u8.html">u8</a>], Self>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Attempts to read a <code>Self</code> from the suffix of the given <code>source</code>.</p>
|
||
<p>This attempts to read a <code>Self</code> from the last <code>size_of::<Self>()</code> bytes
|
||
of <code>source</code>, returning that <code>Self</code> and any preceding bytes. If
|
||
<code>source.len() < size_of::<Self>()</code> or the bytes are not a valid instance
|
||
of <code>Self</code>, it returns <code>Err</code>.</p>
|
||
<h5 id="examples-14"><a class="doc-anchor" href="#examples-14">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>zerocopy::TryFromBytes;
|
||
|
||
<span class="comment">// The only valid value of this type is the byte `0xC0`
|
||
</span><span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(u8)]
|
||
</span><span class="kw">enum </span>C0 { xC0 = <span class="number">0xC0 </span>}
|
||
|
||
<span class="comment">// The only valid value of this type is the bytes `0xC0C0`.
|
||
</span><span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>C0C0(C0, C0);
|
||
|
||
<span class="attr">#[derive(TryFromBytes)]
|
||
#[repr(C)]
|
||
</span><span class="kw">struct </span>Packet {
|
||
magic_number: C0C0,
|
||
mug_size: u8,
|
||
temperature: u8,
|
||
}
|
||
|
||
<span class="comment">// These are more bytes than are needed to encode a `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</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">0xC0</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</span>][..];
|
||
|
||
<span class="kw">let </span>(prefix, packet) = Packet::try_read_from_suffix(bytes).unwrap();
|
||
|
||
<span class="macro">assert_eq!</span>(packet.mug_size, <span class="number">240</span>);
|
||
<span class="macro">assert_eq!</span>(packet.temperature, <span class="number">77</span>);
|
||
<span class="macro">assert_eq!</span>(prefix, <span class="kw-2">&</span>[<span class="number">0u8</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="comment">// These bytes are not valid instance of `Packet`.
|
||
</span><span class="kw">let </span>bytes = <span class="kw-2">&</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">0x10</span>, <span class="number">0xC0</span>, <span class="number">240</span>, <span class="number">77</span>][..];
|
||
<span class="macro">assert!</span>(Packet::try_read_from_suffix(bytes).is_err());</code></pre></div><h5 id="performance-considerations-2"><a class="doc-anchor" href="#performance-considerations-2">§</a>Performance Considerations</h5>
|
||
<p>In this version of zerocopy, this method reads the <code>source</code> into a
|
||
well-aligned stack allocation and <em>then</em> validates that the allocation
|
||
is a valid <code>Self</code>. This ensures that validation can be performed using
|
||
aligned reads (which carry a performance advantage over unaligned reads
|
||
on many platforms) at the cost of an unconditional copy.</p>
|
||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.93.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><section id="impl-TryFromBytes-for-Option%3CNonZero%3Ci8%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#281">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci8%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Ci16%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#284">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci16%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Ci32%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#286">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci32%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Ci64%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#288">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci64%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Ci128%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#290">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Ci128%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Cisize%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#292">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cisize%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Cu8%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#280">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu8%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Cu16%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#283">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu16%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Cu32%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#285">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu32%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Cu64%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#287">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu64%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Cu128%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#289">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cu128%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-Option%3CNonZero%3Cusize%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#291">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonZero%3Cusize%3E%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<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-TryFromBytes-for-bool" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#111-114">Source</a><a href="#impl-TryFromBytes-for-bool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-char" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#140-144">Source</a><a href="#impl-TryFromBytes-for-char" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-f32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#79">Source</a><a href="#impl-TryFromBytes-for-f32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-f64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#80">Source</a><a href="#impl-TryFromBytes-for-f64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-i8" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#67">Source</a><a href="#impl-TryFromBytes-for-i8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-i16" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#70">Source</a><a href="#impl-TryFromBytes-for-i16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-i32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#72">Source</a><a href="#impl-TryFromBytes-for-i32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-i64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#74">Source</a><a href="#impl-TryFromBytes-for-i64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-i128" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#76">Source</a><a href="#impl-TryFromBytes-for-i128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-isize" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#78">Source</a><a href="#impl-TryFromBytes-for-isize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-str" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#173-177">Source</a><a href="#impl-TryFromBytes-for-str" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-u8" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#66">Source</a><a href="#impl-TryFromBytes-for-u8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-u16" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#69">Source</a><a href="#impl-TryFromBytes-for-u16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-u32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#71">Source</a><a href="#impl-TryFromBytes-for-u32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-u64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#73">Source</a><a href="#impl-TryFromBytes-for-u64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-u128" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#75">Source</a><a href="#impl-TryFromBytes-for-u128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-()" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#30">Source</a><a href="#impl-TryFromBytes-for-()" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.unit.html">()</a></h3></section><section id="impl-TryFromBytes-for-usize" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#77">Source</a><a href="#impl-TryFromBytes-for-usize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m128" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-TryFromBytes-for-__m128" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m128d" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-TryFromBytes-for-__m128d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m128i" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-TryFromBytes-for-__m128i" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m256" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-TryFromBytes-for-__m256" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m256d" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-TryFromBytes-for-__m256d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m256i" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1331-1334">Source</a><a href="#impl-TryFromBytes-for-__m256i" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m512" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1336-1340">Source</a><a href="#impl-TryFromBytes-for-__m512" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m512bh" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1336-1340">Source</a><a href="#impl-TryFromBytes-for-__m512bh" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m512d" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1336-1340">Source</a><a href="#impl-TryFromBytes-for-__m512d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-__m512i" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1336-1340">Source</a><a href="#impl-TryFromBytes-for-__m512i" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicBool" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#463">Source</a><a href="#impl-TryFromBytes-for-AtomicBool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicI8" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#459">Source</a><a href="#impl-TryFromBytes-for-AtomicI8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicI16" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#525">Source</a><a href="#impl-TryFromBytes-for-AtomicI16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicI32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#552">Source</a><a href="#impl-TryFromBytes-for-AtomicI32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicI64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#579">Source</a><a href="#impl-TryFromBytes-for-AtomicI64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicIsize" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#606">Source</a><a href="#impl-TryFromBytes-for-AtomicIsize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicU8" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#459">Source</a><a href="#impl-TryFromBytes-for-AtomicU8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicU16" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#525">Source</a><a href="#impl-TryFromBytes-for-AtomicU16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicU32" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#552">Source</a><a href="#impl-TryFromBytes-for-AtomicU32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicU64" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#579">Source</a><a href="#impl-TryFromBytes-for-AtomicU64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-AtomicUsize" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#606">Source</a><a href="#impl-TryFromBytes-for-AtomicUsize" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Ci8%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Ci8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Ci16%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Ci16%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Ci32%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Ci32%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Ci64%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Ci64%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Ci128%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Ci128%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Cisize%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Cisize%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Cu8%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Cu8%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Cu16%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Cu16%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Cu32%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Cu32%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Cu64%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Cu64%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Cu128%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Cu128%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-NonZero%3Cusize%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#238-251">Source</a><a href="#impl-TryFromBytes-for-NonZero%3Cusize%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-Option%3Cfn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(A, B, C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(A, B, C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(A, B, C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<A, B, C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(A, B, C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-(A,)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A,)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, R: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, R: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, S: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, R: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, S: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, R: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, S: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, U: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, R: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, S: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, U: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, V: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, R: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, S: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, U: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, V: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, W: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W,+X)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W,+X)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, R: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, S: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, U: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, V: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, W: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, X: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W,+X,+Y)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W,+X,+Y)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, R: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, S: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, U: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, V: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, W: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, X: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Y: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y)</a></h3></section><section id="impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W,+X,+Y,+Z)" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#1191-1218">Source</a><a href="#impl-TryFromBytes-for-(A,+B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L,+M,+N,+O,+P,+Q,+R,+S,+T,+U,+V,+W,+X,+Y,+Z)" class="anchor">§</a><h3 class="code-header">impl<A: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, B: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, C: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, D: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, E: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, F: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, G: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, H: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, I: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, J: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, K: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, L: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, M: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, N: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, O: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, P: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Q: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, R: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, S: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, U: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, V: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, W: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, X: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Y: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, Z: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.tuple.html">(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)</a></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<B, C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(B, C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<B, C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(B, C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<B, C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(B, C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(B,+C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<B, C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(B, C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(C,+D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<C, D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(C, D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(D,+E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<D, E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(D, E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(E,+F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<E, F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(E, F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(F,+G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<F, G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(F, G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(G,+H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<G, H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(G, H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(H,+I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(H,+I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<H, I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(H, I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(I,+J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(I,+J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<I, J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(I, J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(J,+K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(J,+K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<J, K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(J, K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(K,+L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(K,+L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<K, L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(K, L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn(L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn(L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn(L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn(L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn(L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(L)+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn(L)+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<L, M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>(L) -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cfn()+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#354-357">Source</a><a href="#impl-TryFromBytes-for-Option%3Cfn()+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>() -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn()+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#364-367">Source</a><a href="#impl-TryFromBytes-for-Option%3Cextern+%22C%22+fn()+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>() -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+fn()+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#359-362">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+fn()+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>() -> M></h3></section><section id="impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn()+-%3E+M%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#369-372">Source</a><a href="#impl-TryFromBytes-for-Option%3Cunsafe+extern+%22C%22+fn()+-%3E+M%3E" class="anchor">§</a><h3 class="code-header">impl<M> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><unsafe extern "C" <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.fn.html">fn</a>() -> M></h3></section><section id="impl-TryFromBytes-for-Option%3C%26T%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#341-343">Source</a><a href="#impl-TryFromBytes-for-Option%3C%26T%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.reference.html">&T</a>></h3></section><section id="impl-TryFromBytes-for-Option%3C%26mut+T%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#345-347">Source</a><a href="#impl-TryFromBytes-for-Option%3C%26mut+T%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.reference.html">&mut T</a>></h3></section><section id="impl-TryFromBytes-for-Option%3CNonNull%3CT%3E%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#349-351">Source</a><a href="#impl-TryFromBytes-for-Option%3CNonNull%3CT%3E%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><<a class="struct" href="https://doc.rust-lang.org/1.93.1/core/ptr/non_null/struct.NonNull.html" title="struct core::ptr::non_null::NonNull">NonNull</a><T>></h3></section><section id="impl-TryFromBytes-for-*const+T" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#966">Source</a><a href="#impl-TryFromBytes-for-*const+T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.pointer.html">*const T</a></h3></section><section id="impl-TryFromBytes-for-*mut+T" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#968">Source</a><a href="#impl-TryFromBytes-for-*mut+T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.pointer.html">*mut T</a></h3></section><section id="impl-TryFromBytes-for-AtomicPtr%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#611">Source</a><a href="#impl-TryFromBytes-for-AtomicPtr%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="https://doc.rust-lang.org/1.93.1/core/sync/atomic/struct.AtomicPtr.html" title="struct core::sync::atomic::AtomicPtr">AtomicPtr</a><T></h3></section><section id="impl-TryFromBytes-for-MaybeUninit%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#687">Source</a><a href="#impl-TryFromBytes-for-MaybeUninit%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="union" href="https://doc.rust-lang.org/1.93.1/core/mem/maybe_uninit/union.MaybeUninit.html" title="union core::mem::maybe_uninit::MaybeUninit">CoreMaybeUninit</a><T></h3></section><section id="impl-TryFromBytes-for-UnsafeCell%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#851-866">Source</a><a href="#impl-TryFromBytes-for-UnsafeCell%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><T></h3></section><section id="impl-TryFromBytes-for-%5BT%5D" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#909-933">Source</a><a href="#impl-TryFromBytes-for-%5BT%5D" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-Wrapping%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#661">Source</a><a href="#impl-TryFromBytes-for-Wrapping%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><T></h3></section><section id="impl-TryFromBytes-for-%5BT;+N%5D" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#892-902">Source</a><a href="#impl-TryFromBytes-for-%5BT;+N%5D" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>, const N: <a class="primitive" href="https://doc.rust-lang.org/1.93.1/core/primitive.usize.html">usize</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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-TryFromBytes-for-Cell%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#825">Source</a><a href="#impl-TryFromBytes-for-Cell%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><T></h3></section><section id="impl-TryFromBytes-for-ManuallyDrop%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#735">Source</a><a href="#impl-TryFromBytes-for-ManuallyDrop%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><T></h3></section><section id="impl-TryFromBytes-for-PhantomData%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/impls.rs.html#653">Source</a><a href="#impl-TryFromBytes-for-PhantomData%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><T></h3></section><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-TryFromBytes-for-F32%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#905-921">Source</a><a href="#impl-TryFromBytes-for-F32%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.F32.html" title="struct zerocopy::byteorder::F32">F32</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-F64%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#922-938">Source</a><a href="#impl-TryFromBytes-for-F64%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.F64.html" title="struct zerocopy::byteorder::F64">F64</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-I16%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#787-803">Source</a><a href="#impl-TryFromBytes-for-I16%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.I16.html" title="struct zerocopy::byteorder::I16">I16</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-I32%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#804-820">Source</a><a href="#impl-TryFromBytes-for-I32%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.I32.html" title="struct zerocopy::byteorder::I32">I32</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-I64%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#821-837">Source</a><a href="#impl-TryFromBytes-for-I64%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.I64.html" title="struct zerocopy::byteorder::I64">I64</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-I128%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#838-854">Source</a><a href="#impl-TryFromBytes-for-I128%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.I128.html" title="struct zerocopy::byteorder::I128">I128</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-Isize%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#855-871">Source</a><a href="#impl-TryFromBytes-for-Isize%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.Isize.html" title="struct zerocopy::byteorder::Isize">Isize</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-U16%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#702-718">Source</a><a href="#impl-TryFromBytes-for-U16%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.U16.html" title="struct zerocopy::byteorder::U16">U16</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-U32%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#719-735">Source</a><a href="#impl-TryFromBytes-for-U32%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.U32.html" title="struct zerocopy::byteorder::U32">U32</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-U64%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#736-752">Source</a><a href="#impl-TryFromBytes-for-U64%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.U64.html" title="struct zerocopy::byteorder::U64">U64</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-U128%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#753-769">Source</a><a href="#impl-TryFromBytes-for-U128%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.U128.html" title="struct zerocopy::byteorder::U128">U128</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-Usize%3CO%3E" class="impl"><a class="src rightside" href="../src/zerocopy/byteorder.rs.html#770-786">Source</a><a href="#impl-TryFromBytes-for-Usize%3CO%3E" class="anchor">§</a><h3 class="code-header">impl<O> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="byteorder/struct.Usize.html" title="struct zerocopy::byteorder::Usize">Usize</a><O><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.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</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><O>: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section><section id="impl-TryFromBytes-for-Unalign%3CT%3E" class="impl"><a class="src rightside" href="../src/zerocopy/wrappers.rs.html#114">Source</a><a href="#impl-TryFromBytes-for-Unalign%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a> for <a class="struct" href="struct.Unalign.html" title="struct zerocopy::Unalign">Unalign</a><T><div class="where">where
|
||
T: <a class="trait" href="trait.TryFromBytes.html" title="trait zerocopy::TryFromBytes">TryFromBytes</a>,</div></h3></section></div><script src="../trait.impl/zerocopy/trait.TryFromBytes.js" data-ignore-extern-crates="core" async></script></section></div></main></body></html> |