This commit is contained in:
robin-nitrokey
2024-10-24 18:38:36 +00:00
parent f119bc6eb7
commit f16b50a25f
21 changed files with 171 additions and 171 deletions
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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -166,7 +166,7 @@
<span class="doccomment">/// This is a feature that cbor-smol intends to support, but does not yet
</span>NotYetImplemented,
<span class="doccomment">/// The serialize buffer is full
</span>SerializeBufferFull(usize),
</span>SerializeBufferFull,
<span class="comment">// /// The length of a sequence must be known
// SerializeSeqLengthUnknown,
</span><span class="doccomment">/// Hit the end of buffer, expected more data
@@ -229,7 +229,7 @@
NotYetImplemented =&gt; {
<span class="string">"This is a feature that cbor-smol intends to support, but does not yet"
</span>}
SerializeBufferFull(i) =&gt; <span class="string">"The serialize buffer is full"</span>,
SerializeBufferFull =&gt; <span class="string">"The serialize buffer is full"</span>,
<span class="comment">// SerializeSeqLengthUnknown =&gt; "The length of a sequence must be known",
</span>DeserializeUnexpectedEnd =&gt; <span class="string">"Hit the end of buffer, expected more data"</span>,
<span class="comment">// DeserializeBadVarint =&gt; {
+5 -5
View File
@@ -630,7 +630,7 @@
<span class="kw">let </span>l = buf.len();
<span class="kw">if </span><span class="self">self</span>.len() &lt; l {
<span class="comment">// This buffer will not fit in our slice
</span><span class="kw">return </span><span class="prelude-val">Err</span>(Error::SerializeBufferFull(<span class="number">0</span>));
</span><span class="kw">return </span><span class="prelude-val">Err</span>(Error::SerializeBufferFull);
}
<span class="kw">let </span>(current, rem) = mem::take(<span class="self">self</span>).split_at_mut(l);
current.copy_from_slice(buf);
@@ -644,7 +644,7 @@
<span class="kw">type </span>Error = Error;
<span class="kw">fn </span>write_all(<span class="kw-2">&amp;mut </span><span class="self">self</span>, buf: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="self">self</span>.extend_from_slice(buf)
.or(<span class="prelude-val">Err</span>(Error::SerializeBufferFull(<span class="self">self</span>.len())))
.or(<span class="prelude-val">Err</span>(Error::SerializeBufferFull))
}
}
@@ -653,7 +653,7 @@
<span class="kw">type </span>Error = Error;
<span class="kw">fn </span>write_all(<span class="kw-2">&amp;mut </span><span class="self">self</span>, buf: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="self">self</span>.extend_from_slice(buf)
.or(<span class="prelude-val">Err</span>(Error::SerializeBufferFull(<span class="self">self</span>.len())))
.or(<span class="prelude-val">Err</span>(Error::SerializeBufferFull))
}
}
@@ -662,7 +662,7 @@
<span class="kw">type </span>Error = Error;
<span class="kw">fn </span>write_all(<span class="kw-2">&amp;mut </span><span class="self">self</span>, buf: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="self">self</span>.extend_from_slice(buf)
.or(<span class="prelude-val">Err</span>(Error::SerializeBufferFull(<span class="self">self</span>.len())))
.or(<span class="prelude-val">Err</span>(Error::SerializeBufferFull))
}
}
@@ -671,7 +671,7 @@
<span class="kw">type </span>Error = Error;
<span class="kw">fn </span>write_all(<span class="kw-2">&amp;mut </span><span class="self">self</span>, buf: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
<span class="self">self</span>.extend_from_slice(buf)
.or(<span class="prelude-val">Err</span>(Error::SerializeBufferFull(<span class="self">self</span>.len())))
.or(<span class="prelude-val">Err</span>(Error::SerializeBufferFull))
}
}
+1 -1
View File
@@ -1,3 +1,3 @@
(function() {var implementors = {
"cbor_smol":[["impl&lt;'de, 'a&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/de/trait.Deserializer.html\" title=\"trait serde::de::Deserializer\">Deserializer</a>&lt;'de&gt; for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/de/struct.Deserializer.html\" title=\"struct cbor_smol::de::Deserializer\">Deserializer</a>&lt;'de&gt;"]]
"cbor_smol":[["impl&lt;'de, 'a&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/de/trait.Deserializer.html\" title=\"trait serde::de::Deserializer\">Deserializer</a>&lt;'de&gt; for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/de/struct.Deserializer.html\" title=\"struct cbor_smol::de::Deserializer\">Deserializer</a>&lt;'de&gt;"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
+1 -1
View File
@@ -1,3 +1,3 @@
(function() {var implementors = {
"cbor_smol":[["impl <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/de/trait.Error.html\" title=\"trait serde::de::Error\">Error</a> for <a class=\"enum\" href=\"cbor_smol/error/enum.Error.html\" title=\"enum cbor_smol::error::Error\">Error</a>"]]
"cbor_smol":[["impl <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/de/trait.Error.html\" title=\"trait serde::de::Error\">Error</a> for <a class=\"enum\" href=\"cbor_smol/error/enum.Error.html\" title=\"enum cbor_smol::error::Error\">Error</a>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
+1 -1
View File
@@ -1,3 +1,3 @@
(function() {var implementors = {
"cbor_smol":[["impl <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.Error.html\" title=\"trait serde::ser::Error\">Error</a> for <a class=\"enum\" href=\"cbor_smol/error/enum.Error.html\" title=\"enum cbor_smol::error::Error\">Error</a>"]]
"cbor_smol":[["impl <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.Error.html\" title=\"trait serde::ser::Error\">Error</a> for <a class=\"enum\" href=\"cbor_smol/error/enum.Error.html\" title=\"enum cbor_smol::error::Error\">Error</a>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
@@ -1,3 +1,3 @@
(function() {var implementors = {
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeStruct.html\" title=\"trait serde::ser::SerializeStruct\">SerializeStruct</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeStruct.html\" title=\"trait serde::ser::SerializeStruct\">SerializeStruct</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
@@ -1,3 +1,3 @@
(function() {var implementors = {
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeStructVariant.html\" title=\"trait serde::ser::SerializeStructVariant\">SerializeStructVariant</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeStructVariant.html\" title=\"trait serde::ser::SerializeStructVariant\">SerializeStructVariant</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
+1 -1
View File
@@ -1,3 +1,3 @@
(function() {var implementors = {
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeTuple.html\" title=\"trait serde::ser::SerializeTuple\">SerializeTuple</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeTuple.html\" title=\"trait serde::ser::SerializeTuple\">SerializeTuple</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
@@ -1,3 +1,3 @@
(function() {var implementors = {
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeTupleStruct.html\" title=\"trait serde::ser::SerializeTupleStruct\">SerializeTupleStruct</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeTupleStruct.html\" title=\"trait serde::ser::SerializeTupleStruct\">SerializeTupleStruct</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
@@ -1,3 +1,3 @@
(function() {var implementors = {
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeTupleVariant.html\" title=\"trait serde::ser::SerializeTupleVariant\">SerializeTupleVariant</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeTupleVariant.html\" title=\"trait serde::ser::SerializeTupleVariant\">SerializeTupleVariant</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
+1 -1
View File
@@ -1,3 +1,3 @@
(function() {var implementors = {
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.Serializer.html\" title=\"trait serde::ser::Serializer\">Serializer</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
"cbor_smol":[["impl&lt;'a, W&gt; <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.Serializer.html\" title=\"trait serde::ser::Serializer\">Serializer</a> for &amp;'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a>&lt;W&gt;<div class=\"where\">where\n W: <a class=\"trait\" href=\"cbor_smol/ser/trait.Writer.html\" title=\"trait cbor_smol::ser::Writer\">Writer</a>,</div>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

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