mirror of
https://github.com/trussed-dev/cbor-smol.git
synced 2026-06-20 04:17:03 -07:00
deploy: bd92517cec
This commit is contained in:
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
File diff suppressed because one or more lines are too long
@@ -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 => {
|
||||
<span class="string">"This is a feature that cbor-smol intends to support, but does not yet"
|
||||
</span>}
|
||||
SerializeBufferFull(i) => <span class="string">"The serialize buffer is full"</span>,
|
||||
SerializeBufferFull => <span class="string">"The serialize buffer is full"</span>,
|
||||
<span class="comment">// SerializeSeqLengthUnknown => "The length of a sequence must be known",
|
||||
</span>DeserializeUnexpectedEnd => <span class="string">"Hit the end of buffer, expected more data"</span>,
|
||||
<span class="comment">// DeserializeBadVarint => {
|
||||
|
||||
@@ -630,7 +630,7 @@
|
||||
<span class="kw">let </span>l = buf.len();
|
||||
<span class="kw">if </span><span class="self">self</span>.len() < 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">&mut </span><span class="self">self</span>, buf: <span class="kw-2">&</span>[u8]) -> <span class="prelude-ty">Result</span><()> {
|
||||
<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">&mut </span><span class="self">self</span>, buf: <span class="kw-2">&</span>[u8]) -> <span class="prelude-ty">Result</span><()> {
|
||||
<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">&mut </span><span class="self">self</span>, buf: <span class="kw-2">&</span>[u8]) -> <span class="prelude-ty">Result</span><()> {
|
||||
<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">&mut </span><span class="self">self</span>, buf: <span class="kw-2">&</span>[u8]) -> <span class="prelude-ty">Result</span><()> {
|
||||
<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,3 +1,3 @@
|
||||
(function() {var implementors = {
|
||||
"cbor_smol":[["impl<'de, 'a> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/de/trait.Deserializer.html\" title=\"trait serde::de::Deserializer\">Deserializer</a><'de> for &'a mut <a class=\"struct\" href=\"cbor_smol/de/struct.Deserializer.html\" title=\"struct cbor_smol::de::Deserializer\">Deserializer</a><'de>"]]
|
||||
"cbor_smol":[["impl<'de, 'a> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/de/trait.Deserializer.html\" title=\"trait serde::de::Deserializer\">Deserializer</a><'de> for &'a mut <a class=\"struct\" href=\"cbor_smol/de/struct.Deserializer.html\" title=\"struct cbor_smol::de::Deserializer\">Deserializer</a><'de>"]]
|
||||
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
|
||||
@@ -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,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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeStruct.html\" title=\"trait serde::ser::SerializeStruct\">SerializeStruct</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeStruct.html\" title=\"trait serde::ser::SerializeStruct\">SerializeStruct</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeStructVariant.html\" title=\"trait serde::ser::SerializeStructVariant\">SerializeStructVariant</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeStructVariant.html\" title=\"trait serde::ser::SerializeStructVariant\">SerializeStructVariant</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeTuple.html\" title=\"trait serde::ser::SerializeTuple\">SerializeTuple</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeTuple.html\" title=\"trait serde::ser::SerializeTuple\">SerializeTuple</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeTupleStruct.html\" title=\"trait serde::ser::SerializeTupleStruct\">SerializeTupleStruct</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeTupleStruct.html\" title=\"trait serde::ser::SerializeTupleStruct\">SerializeTupleStruct</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.SerializeTupleVariant.html\" title=\"trait serde::ser::SerializeTupleVariant\">SerializeTupleVariant</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.SerializeTupleVariant.html\" title=\"trait serde::ser::SerializeTupleVariant\">SerializeTupleVariant</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.210/serde/ser/trait.Serializer.html\" title=\"trait serde::ser::Serializer\">Serializer</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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<'a, W> <a class=\"trait\" href=\"https://docs.rs/serde/1.0.213/serde/ser/trait.Serializer.html\" title=\"trait serde::ser::Serializer\">Serializer</a> for &'a mut <a class=\"struct\" href=\"cbor_smol/ser/struct.Serializer.html\" title=\"struct cbor_smol::ser::Serializer\">Serializer</a><W><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
Reference in New Issue
Block a user