mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-24 20:25:00 +00:00
6 lines
15 KiB
HTML
6 lines
15 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="Decoding of QUIC primitives."><title>Decodable in noq_proto::coding - 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="noq_proto" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (b6f0945e4 2025-10-08)" data-channel="nightly" data-search-js="search-8d3311b9.js" data-stringdex-js="stringdex-828709d0.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-ce535bd0.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="#">Decodable</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../noq_proto/index.html">noq_<wbr>proto</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Decodable</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.decode" title="decode">decode</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Decodable-for-Ipv4Addr" title="Ipv4Addr">Ipv4Addr</a></li><li><a href="#impl-Decodable-for-Ipv6Addr" title="Ipv6Addr">Ipv6Addr</a></li><li><a href="#impl-Decodable-for-u8" title="u8">u8</a></li><li><a href="#impl-Decodable-for-u16" title="u16">u16</a></li><li><a href="#impl-Decodable-for-u32" title="u32">u32</a></li><li><a href="#impl-Decodable-for-u64" title="u64">u64</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In noq_<wbr>proto::<wbr>coding</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">noq_proto</a>::<wbr><a href="index.html">coding</a></div><h1>Trait <span class="trait">Decodable</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/noq_proto/coding.rs.html#25-28">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Decodable: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
|
|
// Required method
|
|
fn <a href="#tymethod.decode" class="fn">decode</a><B: Buf>(buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a>) -> <a class="type" href="type.Result.html" title="type noq_proto::coding::Result">Result</a><Self>;
|
|
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Decoding of QUIC primitives.</p>
|
|
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.decode" class="method"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#27">Source</a><h4 class="code-header">fn <a href="#tymethod.decode" class="fn">decode</a><B: Buf>(buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a>) -> <a class="type" href="type.Result.html" title="type noq_proto::coding::Result">Result</a><Self></h4></section></summary><div class="docblock"><p>Decode a <code>Self</code> from the provided buffer, if the buffer is large enough</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/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-Decodable-for-u8" class="impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#30-37">Source</a><a href="#impl-Decodable-for-u8" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></h3></section></summary><div class="impl-items"><section id="method.decode" class="method trait-impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#31-36">Source</a><a href="#method.decode" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.decode" class="fn">decode</a><B: Buf>(buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a>) -> <a class="type" href="type.Result.html" title="type noq_proto::coding::Result">Result</a><Self></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Decodable-for-u16" class="impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#45-52">Source</a><a href="#impl-Decodable-for-u16" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></h3></section></summary><div class="impl-items"><section id="method.decode-1" class="method trait-impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#46-51">Source</a><a href="#method.decode-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.decode" class="fn">decode</a><B: Buf>(buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a>) -> <a class="type" href="type.Result.html" title="type noq_proto::coding::Result">Result</a><Self></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Decodable-for-u32" class="impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#60-67">Source</a><a href="#impl-Decodable-for-u32" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h3></section></summary><div class="impl-items"><section id="method.decode-2" class="method trait-impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#61-66">Source</a><a href="#method.decode-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.decode" class="fn">decode</a><B: Buf>(buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a>) -> <a class="type" href="type.Result.html" title="type noq_proto::coding::Result">Result</a><Self></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Decodable-for-u64" class="impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#75-82">Source</a><a href="#impl-Decodable-for-u64" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></h3></section></summary><div class="impl-items"><section id="method.decode-3" class="method trait-impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#76-81">Source</a><a href="#method.decode-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.decode" class="fn">decode</a><B: Buf>(buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a>) -> <a class="type" href="type.Result.html" title="type noq_proto::coding::Result">Result</a><Self></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Decodable-for-Ipv4Addr" class="impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#90-99">Source</a><a href="#impl-Decodable-for-Ipv4Addr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/core/net/ip_addr/struct.Ipv4Addr.html" title="struct core::net::ip_addr::Ipv4Addr">Ipv4Addr</a></h3></section></summary><div class="impl-items"><section id="method.decode-4" class="method trait-impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#91-98">Source</a><a href="#method.decode-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.decode" class="fn">decode</a><B: Buf>(buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a>) -> <a class="type" href="type.Result.html" title="type noq_proto::coding::Result">Result</a><Self></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Decodable-for-Ipv6Addr" class="impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#107-116">Source</a><a href="#impl-Decodable-for-Ipv6Addr" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="struct" href="https://doc.rust-lang.org/nightly/core/net/ip_addr/struct.Ipv6Addr.html" title="struct core::net::ip_addr::Ipv6Addr">Ipv6Addr</a></h3></section></summary><div class="impl-items"><section id="method.decode-5" class="method trait-impl"><a class="src rightside" href="../../src/noq_proto/coding.rs.html#108-115">Source</a><a href="#method.decode-5" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.decode" class="fn">decode</a><B: Buf>(buf: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut B</a>) -> <a class="type" href="type.Result.html" title="type noq_proto::coding::Result">Result</a><Self></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-Decodable-for-FrameType" class="impl"><a class="src rightside" href="../../src/noq_proto/frame.rs.html#168-172">Source</a><a href="#impl-Decodable-for-FrameType" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="enum" href="../enum.FrameType.html" title="enum noq_proto::FrameType">FrameType</a></h3></section><section id="impl-Decodable-for-MaybeFrame" class="impl"><a class="src rightside" href="../../src/noq_proto/frame.rs.html#294-302">Source</a><a href="#impl-Decodable-for-MaybeFrame" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="enum" href="../enum.MaybeFrame.html" title="enum noq_proto::MaybeFrame">MaybeFrame</a></h3></section><section id="impl-Decodable-for-PathId" class="impl"><a class="src rightside" href="../../src/noq_proto/connection/paths.rs.html#36-42">Source</a><a href="#impl-Decodable-for-PathId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="struct" href="../struct.PathId.html" title="struct noq_proto::PathId">PathId</a></h3></section><section id="impl-Decodable-for-StreamId" class="impl"><a class="src rightside" href="../../src/noq_proto/lib.rs.html#311-315">Source</a><a href="#impl-Decodable-for-StreamId" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="struct" href="../struct.StreamId.html" title="struct noq_proto::StreamId">StreamId</a></h3></section><section id="impl-Decodable-for-Code" class="impl"><a class="src rightside" href="../../src/noq_proto/transport_error.rs.html#76-80">Source</a><a href="#impl-Decodable-for-Code" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="struct" href="../struct.TransportErrorCode.html" title="struct noq_proto::TransportErrorCode">Code</a></h3></section><section id="impl-Decodable-for-VarInt" class="impl"><a class="src rightside" href="../../src/noq_proto/varint.rs.html#164-200">Source</a><a href="#impl-Decodable-for-VarInt" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Decodable.html" title="trait noq_proto::coding::Decodable">Decodable</a> for <a class="struct" href="../struct.VarInt.html" title="struct noq_proto::VarInt">VarInt</a></h3></section></div><script src="../../trait.impl/noq_proto/coding/trait.Decodable.js" data-ignore-extern-crates="std,core" async></script></section></div></main></body></html> |