This commit is contained in:
nickray
2021-02-19 23:59:14 +00:00
parent 0ce1ca1333
commit 3dbdce86e2
35 changed files with 433 additions and 142 deletions

View File

@@ -3,4 +3,4 @@
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../flexiber/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate flexiber</p><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span>
</span>
<span class="in-band">List of all items</span></h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.Decoder.html">Decoder</a></li><li><a href="struct.Encoder.html">Encoder</a></li><li><a href="struct.Error.html">Error</a></li><li><a href="struct.Length.html">Length</a></li><li><a href="struct.Slice.html">Slice</a></li><li><a href="struct.Tag.html">Tag</a></li><li><a href="struct.TaggedValue.html">TaggedValue</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Class.html">Class</a></li><li><a href="enum.ErrorKind.html">ErrorKind</a></li></ul><h3 id="Traits">Traits</h3><ul class="traits docblock"><li><a href="trait.Container.html">Container</a></li><li><a href="trait.Decodable.html">Decodable</a></li><li><a href="trait.Encodable.html">Encodable</a></li><li><a href="trait.Tagged.html">Tagged</a></li></ul><h3 id="Derive Macros">Derive Macros</h3><ul class="derives docblock"><li><a href="derive.Decodable.html">Decodable</a></li><li><a href="derive.Encodable.html">Encodable</a></li></ul><h3 id="Typedefs">Typedefs</h3><ul class="typedefs docblock"><li><a href="type.Result.html">Result</a></li><li><a href="type.TaggedSlice.html">TaggedSlice</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "flexiber";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
<span class="in-band">List of all items</span></h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.Decoder.html">Decoder</a></li><li><a href="struct.Encoder.html">Encoder</a></li><li><a href="struct.Error.html">Error</a></li><li><a href="struct.Length.html">Length</a></li><li><a href="struct.SimpleTag.html">SimpleTag</a></li><li><a href="struct.Slice.html">Slice</a></li><li><a href="struct.Tag.html">Tag</a></li><li><a href="struct.TaggedValue.html">TaggedValue</a></li></ul><h3 id="Enums">Enums</h3><ul class="enums docblock"><li><a href="enum.Class.html">Class</a></li><li><a href="enum.ErrorKind.html">ErrorKind</a></li></ul><h3 id="Traits">Traits</h3><ul class="traits docblock"><li><a href="trait.Container.html">Container</a></li><li><a href="trait.Decodable.html">Decodable</a></li><li><a href="trait.Encodable.html">Encodable</a></li><li><a href="trait.TagLike.html">TagLike</a></li><li><a href="trait.Tagged.html">Tagged</a></li></ul><h3 id="Derive Macros">Derive Macros</h3><ul class="derives docblock"><li><a href="derive.Decodable.html">Decodable</a></li><li><a href="derive.Encodable.html">Encodable</a></li></ul><h3 id="Typedefs">Typedefs</h3><ul class="typedefs docblock"><li><a href="type.Result.html">Result</a></li><li><a href="type.TaggedSlice.html">TaggedSlice</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "flexiber";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `flexiber` crate."><meta name="keywords" content="rust, rustlang, rust-lang, flexiber"><title>flexiber - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../flexiber/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate flexiber</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all flexiber's items</p></a><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class="location"></p><script>window.sidebarCurrent = {name: "flexiber", ty: "mod", relpath: "../"};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/flexiber/lib.rs.html#1-54" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">flexiber</a></span></h1><div class="docblock"><h1 id="flexiber" class="section-header"><a href="#flexiber">flexiber</a></h1>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/flexiber/lib.rs.html#1-56" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">flexiber</a></span></h1><div class="docblock"><h1 id="flexiber" class="section-header"><a href="#flexiber">flexiber</a></h1>
<p>Implementation of the BER-TLV serialization format from ISO 7816-4:2005.</p>
<p>ITU-T X.690 (08/2015) defines the BER, CER and DER encoding rules for ASN.1</p>
<p>The exact same document is <a href="https://standards.iso.org/ittf/PubliclyAvailableStandards/c068345_ISO_IEC_8825-1_2015.zip">ISO/IET 8825-1</a>, which is freely available,
@@ -21,6 +21,7 @@ avoided.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Encoder.html" title="flexiber::Encoder struct">Encoder</a></td><td class="docblock-short"><p>SIMPLE-TLV encoder.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Error.html" title="flexiber::Error struct">Error</a></td><td class="docblock-short"><p>Error type.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Length.html" title="flexiber::Length struct">Length</a></td><td class="docblock-short"><p>SIMPLE-TLV-encoded length.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.SimpleTag.html" title="flexiber::SimpleTag struct">SimpleTag</a></td><td class="docblock-short"><p>These are tags like in SIMPLE-TLV.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Slice.html" title="flexiber::Slice struct">Slice</a></td><td class="docblock-short"><p>Slice of at most <code>Length::max()</code> bytes.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Tag.html" title="flexiber::Tag struct">Tag</a></td><td class="docblock-short"><p>The tag field consists of a single byte encoding a tag number from 1 to 254. The values '00' and 'FF' are invalid.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.TaggedValue.html" title="flexiber::TaggedValue struct">TaggedValue</a></td><td class="docblock-short"><p>SIMPLE-TLV data object.</p>
@@ -30,6 +31,8 @@ avoided.</p>
<table><tr class="module-item"><td><a class="trait" href="trait.Container.html" title="flexiber::Container trait">Container</a></td><td class="docblock-short"><p>Multiple encodables in a container.</p>
</td></tr><tr class="module-item"><td><a class="trait" href="trait.Decodable.html" title="flexiber::Decodable trait">Decodable</a></td><td class="docblock-short"><p>Decoding trait.</p>
</td></tr><tr class="module-item"><td><a class="trait" href="trait.Encodable.html" title="flexiber::Encodable trait">Encodable</a></td><td class="docblock-short"><p>Encoding trait.</p>
</td></tr><tr class="module-item"><td><a class="trait" href="trait.TagLike.html" title="flexiber::TagLike trait">TagLike</a></td><td class="docblock-short"><p>This is the common trait that types to be used as tags
are supposed to implement.</p>
</td></tr><tr class="module-item"><td><a class="trait" href="trait.Tagged.html" title="flexiber::Tagged trait">Tagged</a></td><td class="docblock-short"><p>Types with an associated SIMPLE-TLV <a href="../flexiber/struct.Tag.html" title="Tag"><code>Tag</code></a>.</p>
</td></tr></table><h2 id="types" class="section-header"><a href="#types">Type Definitions</a></h2>
<table><tr class="module-item"><td><a class="type" href="type.Result.html" title="flexiber::Result type">Result</a></td><td class="docblock-short"><p>Result type.</p>

View File

@@ -1 +1 @@
initSidebarItems({"derive":[["Decodable","Derive the `Decodable` trait on a struct."],["Encodable","Derive the `Encodable` trait on a struct."]],"enum":[["Class",""],["ErrorKind","Error type."]],"struct":[["Decoder","SIMPLE-TLV decoder."],["Encoder","SIMPLE-TLV encoder."],["Error","Error type."],["Length","SIMPLE-TLV-encoded length."],["Slice","Slice of at most `Length::max()` bytes."],["Tag","The tag field consists of a single byte encoding a tag number from 1 to 254. The values '00' and 'FF' are invalid."],["TaggedValue","SIMPLE-TLV data object."]],"trait":[["Container","Multiple encodables in a container."],["Decodable","Decoding trait."],["Encodable","Encoding trait."],["Tagged","Types with an associated SIMPLE-TLV [`Tag`]."]],"type":[["Result","Result type."],["TaggedSlice","Raw SIMPLE-TLV data object `TaggedValue<Slice<'_>>`."]]});
initSidebarItems({"derive":[["Decodable","Derive the `Decodable` trait on a struct."],["Encodable","Derive the `Encodable` trait on a struct."]],"enum":[["Class",""],["ErrorKind","Error type."]],"struct":[["Decoder","SIMPLE-TLV decoder."],["Encoder","SIMPLE-TLV encoder."],["Error","Error type."],["Length","SIMPLE-TLV-encoded length."],["SimpleTag","These are tags like in SIMPLE-TLV."],["Slice","Slice of at most `Length::max()` bytes."],["Tag","The tag field consists of a single byte encoding a tag number from 1 to 254. The values '00' and 'FF' are invalid."],["TaggedValue","SIMPLE-TLV data object."]],"trait":[["Container","Multiple encodables in a container."],["Decodable","Decoding trait."],["Encodable","Encoding trait."],["TagLike","This is the common trait that types to be used as tags are supposed to implement."],["Tagged","Types with an associated SIMPLE-TLV [`Tag`]."]],"type":[["Result","Result type."],["TaggedSlice","Raw SIMPLE-TLV data object `TaggedValue<Slice<'_>>`."]]});

View File

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

View File

@@ -4,8 +4,8 @@
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/flexiber/decoder.rs.html#6-15" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">flexiber</a>::<wbr><a class="struct" href="">Decoder</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Decoder&lt;'a&gt; { /* fields omitted */ }</pre></div><div class="docblock"><p>SIMPLE-TLV decoder.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;'a&gt; <a class="struct" href="../flexiber/struct.Decoder.html" title="struct flexiber::Decoder">Decoder</a>&lt;'a&gt;</code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/flexiber/decoder.rs.html#17-128" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(bytes: &amp;'a [u8]) -&gt; Self</code><a class="srclink" href="../src/flexiber/decoder.rs.html#19-24" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a new decoder for the given byte slice.</p>
</div><h4 id="method.decode" class="method"><code>pub fn <a href="#method.decode" class="fnname">decode</a>&lt;T:&nbsp;<a class="trait" href="../flexiber/trait.Decodable.html" title="trait flexiber::Decodable">Decodable</a>&lt;'a&gt;&gt;(&amp;mut self) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;T&gt;</code><a class="srclink" href="../src/flexiber/decoder.rs.html#27-36" title="goto source code">[src]</a></h4><div class="docblock"><p>Decode a value which impls the <a href="../flexiber/trait.Decodable.html" title="Decodable"><code>Decodable</code></a> trait.</p>
</div><h4 id="method.decode_tagged_value" class="method"><code>pub fn <a href="#method.decode_tagged_value" class="fnname">decode_tagged_value</a>&lt;V:&nbsp;<a class="trait" href="../flexiber/trait.Decodable.html" title="trait flexiber::Decodable">Decodable</a>&lt;'a&gt;&gt;(&amp;mut self, tag: <a class="struct" href="../flexiber/struct.Tag.html" title="struct flexiber::Tag">Tag</a>) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;V&gt;</code><a class="srclink" href="../src/flexiber/decoder.rs.html#39-43" title="goto source code">[src]</a></h4><div class="docblock"><p>Decode a TaggedValue with tag checked to be as expected, returning the value</p>
</div><h4 id="method.decode_tagged_slice" class="method"><code>pub fn <a href="#method.decode_tagged_slice" class="fnname">decode_tagged_slice</a>(&amp;mut self, tag: <a class="struct" href="../flexiber/struct.Tag.html" title="struct flexiber::Tag">Tag</a>) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;&amp;'a [u8]&gt;</code><a class="srclink" href="../src/flexiber/decoder.rs.html#46-50" title="goto source code">[src]</a></h4><div class="docblock"><p>Decode a TaggedSlice with tag checked to be as expected, returning the value</p>
</div><h4 id="method.decode_tagged_value" class="method"><code>pub fn <a href="#method.decode_tagged_value" class="fnname">decode_tagged_value</a>&lt;T:&nbsp;<a class="trait" href="../flexiber/trait.Decodable.html" title="trait flexiber::Decodable">Decodable</a>&lt;'a&gt; + <a class="trait" href="../flexiber/trait.TagLike.html" title="trait flexiber::TagLike">TagLike</a>, V:&nbsp;<a class="trait" href="../flexiber/trait.Decodable.html" title="trait flexiber::Decodable">Decodable</a>&lt;'a&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;tag: T<br>) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;V&gt;</code><a class="srclink" href="../src/flexiber/decoder.rs.html#39-43" title="goto source code">[src]</a></h4><div class="docblock"><p>Decode a TaggedValue with tag checked to be as expected, returning the value</p>
</div><h4 id="method.decode_tagged_slice" class="method"><code>pub fn <a href="#method.decode_tagged_slice" class="fnname">decode_tagged_slice</a>&lt;T:&nbsp;<a class="trait" href="../flexiber/trait.Decodable.html" title="trait flexiber::Decodable">Decodable</a>&lt;'a&gt; + <a class="trait" href="../flexiber/trait.TagLike.html" title="trait flexiber::TagLike">TagLike</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;tag: T<br>) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;&amp;'a [u8]&gt;</code><a class="srclink" href="../src/flexiber/decoder.rs.html#46-50" title="goto source code">[src]</a></h4><div class="docblock"><p>Decode a TaggedSlice with tag checked to be as expected, returning the value</p>
</div><h4 id="method.error" class="method"><code>pub fn <a href="#method.error" class="fnname">error</a>&lt;T&gt;(&amp;mut self, kind: <a class="enum" href="../flexiber/enum.ErrorKind.html" title="enum flexiber::ErrorKind">ErrorKind</a>) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;T&gt;</code><a class="srclink" href="../src/flexiber/decoder.rs.html#54-57" title="goto source code">[src]</a></h4><div class="docblock"><p>Return an error with the given <a href="../flexiber/enum.ErrorKind.html" title="ErrorKind"><code>ErrorKind</code></a>, annotating it with
context about where the error occurred.</p>
</div><h4 id="method.is_failed" class="method"><code>pub fn <a href="#method.is_failed" class="fnname">is_failed</a>(&amp;self) -&gt; bool</code><a class="srclink" href="../src/flexiber/decoder.rs.html#60-62" title="goto source code">[src]</a></h4><div class="docblock"><p>Did the decoding operation fail due to an error?</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,18 +1,18 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `TaggedSlice` type in crate `flexiber`."><meta name="keywords" content="rust, rustlang, rust-lang, TaggedSlice"><title>flexiber::TaggedSlice - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc type"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../flexiber/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Type Definition TaggedSlice</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.as_bytes">as_bytes</a><a href="#method.decode_nested">decode_nested</a><a href="#method.from">from</a><a href="#method.is_empty">is_empty</a><a href="#method.length">length</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Decodable%3C%27a%3E">Decodable&lt;&#39;a&gt;</a><a href="#impl-Encodable">Encodable</a></div></div><p class="location"><a href="index.html">flexiber</a></p><script>window.sidebarCurrent = {name: "TaggedSlice", ty: "type", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/flexiber/tagged.rs.html#14" title="goto source code">[src]</a></span><span class="in-band">Type Definition <a href="index.html">flexiber</a>::<wbr><a class="type" href="">TaggedSlice</a></span></h1><pre class="rust typedef">type TaggedSlice&lt;'a&gt; = <a class="struct" href="../flexiber/struct.TaggedValue.html" title="struct flexiber::TaggedValue">TaggedValue</a>&lt;<a class="struct" href="../flexiber/struct.Slice.html" title="struct flexiber::Slice">Slice</a>&lt;'a&gt;&gt;;</pre><div class="docblock"><p>Raw SIMPLE-TLV data object <code>TaggedValue&lt;Slice&lt;'_&gt;&gt;</code>.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;'a&gt; <a class="type" href="../flexiber/type.TaggedSlice.html" title="type flexiber::TaggedSlice">TaggedSlice</a>&lt;'a&gt;</code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/flexiber/tagged.rs.html#52-96" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>pub fn <a href="#method.from" class="fnname">from</a>(tag: <a class="struct" href="../flexiber/struct.Tag.html" title="struct flexiber::Tag">Tag</a>, slice: &amp;'a [u8]) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;Self&gt;</code><a class="srclink" href="../src/flexiber/tagged.rs.html#55-59" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a new tagged slice, checking lengths.</p>
</div><h4 id="method.as_bytes" class="method"><code>pub fn <a href="#method.as_bytes" class="fnname">as_bytes</a>(&amp;self) -&gt; &amp;'a [u8]</code><a class="srclink" href="../src/flexiber/tagged.rs.html#62-64" title="goto source code">[src]</a></h4><div class="docblock"><p>Borrow the inner byte slice.</p>
</div><h4 id="method.length" class="method"><code>pub fn <a href="#method.length" class="fnname">length</a>(&amp;self) -&gt; <a class="struct" href="../flexiber/struct.Length.html" title="struct flexiber::Length">Length</a></code><a class="srclink" href="../src/flexiber/tagged.rs.html#67-69" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the length of the inner byte slice.</p>
</div><h4 id="method.is_empty" class="method"><code>pub fn <a href="#method.is_empty" class="fnname">is_empty</a>(&amp;self) -&gt; bool</code><a class="srclink" href="../src/flexiber/tagged.rs.html#72-74" title="goto source code">[src]</a></h4><div class="docblock"><p>Is the inner byte slice empty?</p>
</div><h4 id="method.decode_nested" class="method"><code>pub fn <a href="#method.decode_nested" class="fnname">decode_nested</a>&lt;F, T&gt;(&amp;self, f: F) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut <a class="struct" href="../flexiber/struct.Decoder.html" title="struct flexiber::Decoder">Decoder</a>&lt;'a&gt;) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;T&gt;,&nbsp;</span></code><a class="srclink" href="../src/flexiber/tagged.rs.html#88-95" title="goto source code">[src]</a></h4><div class="docblock"><p>Decode nested values, creating a new <a href="../flexiber/struct.Decoder.html" title="Decoder"><code>Decoder</code></a> for
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/flexiber/tagged.rs.html#14" title="goto source code">[src]</a></span><span class="in-band">Type Definition <a href="index.html">flexiber</a>::<wbr><a class="type" href="">TaggedSlice</a></span></h1><pre class="rust typedef">type TaggedSlice&lt;'a, T&nbsp;=&nbsp;<a class="struct" href="../flexiber/struct.Tag.html" title="struct flexiber::Tag">Tag</a>&gt; = <a class="struct" href="../flexiber/struct.TaggedValue.html" title="struct flexiber::TaggedValue">TaggedValue</a>&lt;<a class="struct" href="../flexiber/struct.Slice.html" title="struct flexiber::Slice">Slice</a>&lt;'a&gt;, T&gt;;</pre><div class="docblock"><p>Raw SIMPLE-TLV data object <code>TaggedValue&lt;Slice&lt;'_&gt;&gt;</code>.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl&lt;'a, T&gt; <a class="type" href="../flexiber/type.TaggedSlice.html" title="type flexiber::TaggedSlice">TaggedSlice</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>,&nbsp;</span></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/flexiber/tagged.rs.html#56-103" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>pub fn <a href="#method.from" class="fnname">from</a>(tag: T, slice: &amp;'a [u8]) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;Self&gt;</code><a class="srclink" href="../src/flexiber/tagged.rs.html#62-66" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a new tagged slice, checking lengths.</p>
</div><h4 id="method.as_bytes" class="method"><code>pub fn <a href="#method.as_bytes" class="fnname">as_bytes</a>(&amp;self) -&gt; &amp;'a [u8]</code><a class="srclink" href="../src/flexiber/tagged.rs.html#69-71" title="goto source code">[src]</a></h4><div class="docblock"><p>Borrow the inner byte slice.</p>
</div><h4 id="method.length" class="method"><code>pub fn <a href="#method.length" class="fnname">length</a>(&amp;self) -&gt; <a class="struct" href="../flexiber/struct.Length.html" title="struct flexiber::Length">Length</a></code><a class="srclink" href="../src/flexiber/tagged.rs.html#74-76" title="goto source code">[src]</a></h4><div class="docblock"><p>Get the length of the inner byte slice.</p>
</div><h4 id="method.is_empty" class="method"><code>pub fn <a href="#method.is_empty" class="fnname">is_empty</a>(&amp;self) -&gt; bool</code><a class="srclink" href="../src/flexiber/tagged.rs.html#79-81" title="goto source code">[src]</a></h4><div class="docblock"><p>Is the inner byte slice empty?</p>
</div><h4 id="method.decode_nested" class="method"><code>pub fn <a href="#method.decode_nested" class="fnname">decode_nested</a>&lt;F, R&gt;(&amp;self, f: F) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;R&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;mut <a class="struct" href="../flexiber/struct.Decoder.html" title="struct flexiber::Decoder">Decoder</a>&lt;'a&gt;) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;R&gt;,&nbsp;</span></code><a class="srclink" href="../src/flexiber/tagged.rs.html#95-102" title="goto source code">[src]</a></h4><div class="docblock"><p>Decode nested values, creating a new <a href="../flexiber/struct.Decoder.html" title="Decoder"><code>Decoder</code></a> for
the data contained in the sequence's body and passing it to the provided
<a href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="FnOnce"><code>FnOnce</code></a>.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Decodable%3C%27a%3E" class="impl"><code class="in-band">impl&lt;'a&gt; <a class="trait" href="../flexiber/trait.Decodable.html" title="trait flexiber::Decodable">Decodable</a>&lt;'a&gt; for <a class="type" href="../flexiber/type.TaggedSlice.html" title="type flexiber::TaggedSlice">TaggedSlice</a>&lt;'a&gt;</code><a href="#impl-Decodable%3C%27a%3E" class="anchor"></a><a class="srclink" href="../src/flexiber/tagged.rs.html#98-106" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.decode" class="method hidden"><code>fn <a href="../flexiber/trait.Decodable.html#tymethod.decode" class="fnname">decode</a>(decoder: &amp;mut <a class="struct" href="../flexiber/struct.Decoder.html" title="struct flexiber::Decoder">Decoder</a>&lt;'a&gt;) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;<a class="type" href="../flexiber/type.TaggedSlice.html" title="type flexiber::TaggedSlice">TaggedSlice</a>&lt;'a&gt;&gt;</code><a class="srclink" href="../src/flexiber/tagged.rs.html#99-105" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempt to decode this message using the provided decoder.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Decodable%3C%27a%3E" class="impl"><code class="in-band">impl&lt;'a, T&gt; <a class="trait" href="../flexiber/trait.Decodable.html" title="trait flexiber::Decodable">Decodable</a>&lt;'a&gt; for <a class="type" href="../flexiber/type.TaggedSlice.html" title="type flexiber::TaggedSlice">TaggedSlice</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../flexiber/trait.Decodable.html" title="trait flexiber::Decodable">Decodable</a>&lt;'a&gt; + <a class="trait" href="../flexiber/trait.TagLike.html" title="trait flexiber::TagLike">TagLike</a>,&nbsp;</span></code><a href="#impl-Decodable%3C%27a%3E" class="anchor"></a><a class="srclink" href="../src/flexiber/tagged.rs.html#105-116" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.decode" class="method hidden"><code>fn <a href="../flexiber/trait.Decodable.html#tymethod.decode" class="fnname">decode</a>(decoder: &amp;mut <a class="struct" href="../flexiber/struct.Decoder.html" title="struct flexiber::Decoder">Decoder</a>&lt;'a&gt;) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;Self&gt;</code><a class="srclink" href="../src/flexiber/tagged.rs.html#109-115" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Attempt to decode this message using the provided decoder.</p>
</div><h4 id="method.from_bytes" class="method hidden"><code>fn <a href="../flexiber/trait.Decodable.html#method.from_bytes" class="fnname">from_bytes</a>(bytes: &amp;'a [u8]) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;Self&gt;</code><a class="srclink" href="../src/flexiber/traits.rs.html#27-31" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Parse <code>Self</code> from the provided byte slice.</p>
</div></div><h3 id="impl-Encodable" class="impl"><code class="in-band">impl&lt;'a&gt; <a class="trait" href="../flexiber/trait.Encodable.html" title="trait flexiber::Encodable">Encodable</a> for <a class="type" href="../flexiber/type.TaggedSlice.html" title="type flexiber::TaggedSlice">TaggedSlice</a>&lt;'a&gt;</code><a href="#impl-Encodable" class="anchor"></a><a class="srclink" href="../src/flexiber/tagged.rs.html#108-117" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.encoded_length" class="method hidden"><code>fn <a href="../flexiber/trait.Encodable.html#tymethod.encoded_length" class="fnname">encoded_length</a>(&amp;self) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;<a class="struct" href="../flexiber/struct.Length.html" title="struct flexiber::Length">Length</a>&gt;</code><a class="srclink" href="../src/flexiber/tagged.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Compute the length of this value in bytes when encoded as SIMPLE-TLV</p>
</div><h4 id="method.encode" class="method hidden"><code>fn <a href="../flexiber/trait.Encodable.html#tymethod.encode" class="fnname">encode</a>(&amp;self, encoder: &amp;mut <a class="struct" href="../flexiber/struct.Encoder.html" title="struct flexiber::Encoder">Encoder</a>&lt;'_&gt;) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;()&gt;</code><a class="srclink" href="../src/flexiber/tagged.rs.html#113-116" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Encode this value as SIMPLE-TLV using the provided <a href="../flexiber/struct.Encoder.html" title="Encoder"><code>Encoder</code></a>.</p>
</div></div><h3 id="impl-Encodable" class="impl"><code class="in-band">impl&lt;'a, T&gt; <a class="trait" href="../flexiber/trait.Encodable.html" title="trait flexiber::Encodable">Encodable</a> for <a class="type" href="../flexiber/type.TaggedSlice.html" title="type flexiber::TaggedSlice">TaggedSlice</a>&lt;'a, T&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="../flexiber/trait.Encodable.html" title="trait flexiber::Encodable">Encodable</a>,&nbsp;</span></code><a href="#impl-Encodable" class="anchor"></a><a class="srclink" href="../src/flexiber/tagged.rs.html#118-130" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.encoded_length" class="method hidden"><code>fn <a href="../flexiber/trait.Encodable.html#tymethod.encoded_length" class="fnname">encoded_length</a>(&amp;self) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;<a class="struct" href="../flexiber/struct.Length.html" title="struct flexiber::Length">Length</a>&gt;</code><a class="srclink" href="../src/flexiber/tagged.rs.html#122-124" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Compute the length of this value in bytes when encoded as SIMPLE-TLV</p>
</div><h4 id="method.encode" class="method hidden"><code>fn <a href="../flexiber/trait.Encodable.html#tymethod.encode" class="fnname">encode</a>(&amp;self, encoder: &amp;mut <a class="struct" href="../flexiber/struct.Encoder.html" title="struct flexiber::Encoder">Encoder</a>&lt;'_&gt;) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;()&gt;</code><a class="srclink" href="../src/flexiber/tagged.rs.html#126-129" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Encode this value as SIMPLE-TLV using the provided <a href="../flexiber/struct.Encoder.html" title="Encoder"><code>Encoder</code></a>.</p>
</div><h4 id="method.encode_to_slice" class="method hidden"><code>fn <a href="../flexiber/trait.Encodable.html#method.encode_to_slice" class="fnname">encode_to_slice</a>&lt;'a&gt;(&amp;self, buf: &amp;'a mut [u8]) -&gt; <a class="type" href="../flexiber/type.Result.html" title="type flexiber::Result">Result</a>&lt;&amp;'a [u8]&gt;</code><a class="srclink" href="../src/flexiber/traits.rs.html#59-63" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message. <a href="../flexiber/trait.Encodable.html#method.encode_to_slice">Read more</a></p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "flexiber";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,3 @@
(function() {var implementors = {};
implementors["flexiber"] = [{"text":"impl&lt;'a&gt; TryFrom&lt;&amp;'a [&amp;'a (dyn Encodable + 'a)]&gt; for Length","synthetic":false,"types":[]},{"text":"impl TryFrom&lt;usize&gt; for Length","synthetic":false,"types":[]},{"text":"impl TryFrom&lt;u8&gt; for Class","synthetic":false,"types":[]},{"text":"impl TryFrom&lt;&amp;'_ [u8]&gt; for Tag","synthetic":false,"types":[]},{"text":"impl TryFrom&lt;u8&gt; for Tag","synthetic":false,"types":[]}];
implementors["flexiber"] = [{"text":"impl&lt;'a&gt; TryFrom&lt;&amp;'a [&amp;'a (dyn Encodable + 'a)]&gt; for Length","synthetic":false,"types":[]},{"text":"impl TryFrom&lt;usize&gt; for Length","synthetic":false,"types":[]},{"text":"impl TryFrom&lt;u8&gt; for SimpleTag","synthetic":false,"types":[]},{"text":"impl TryFrom&lt;u8&gt; for Class","synthetic":false,"types":[]},{"text":"impl TryFrom&lt;&amp;'_ [u8]&gt; for Tag","synthetic":false,"types":[]},{"text":"impl TryFrom&lt;u8&gt; for Tag","synthetic":false,"types":[]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More