From 6c7b480846fe6104ad69d574ad01e5188948bc1f Mon Sep 17 00:00:00 2001 From: kl-botsu Date: Fri, 28 Jul 2023 13:31:10 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20khonsula?= =?UTF-8?q?bs/pot@64335165f76a2eb7c65433b8d2cf07fb05abd6ce=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/implementors/core/clone/trait.Clone.js | 2 +- main/implementors/core/cmp/trait.PartialEq.js | 2 +- main/implementors/core/convert/trait.From.js | 2 +- main/implementors/core/fmt/trait.Debug.js | 2 +- main/implementors/core/fmt/trait.Display.js | 2 +- main/implementors/core/marker/trait.Copy.js | 2 +- .../core/marker/trait.StructuralEq.js | 2 +- .../core/marker/trait.StructuralPartialEq.js | 2 +- .../serde/de/trait.Deserialize.js | 2 +- .../serde/de/trait.Deserializer.js | 2 +- .../implementors/serde/de/trait.EnumAccess.js | 2 +- main/implementors/serde/de/trait.Error.js | 2 +- .../serde/de/trait.VariantAccess.js | 2 +- main/implementors/serde/ser/trait.Error.js | 2 +- .../implementors/serde/ser/trait.Serialize.js | 2 +- .../serde/ser/trait.SerializeMap.js | 2 +- .../serde/ser/trait.SerializeSeq.js | 2 +- .../serde/ser/trait.SerializeStruct.js | 2 +- .../serde/ser/trait.SerializeStructVariant.js | 2 +- .../serde/ser/trait.SerializeTuple.js | 2 +- .../serde/ser/trait.SerializeTupleStruct.js | 2 +- .../serde/ser/trait.SerializeTupleVariant.js | 2 +- .../serde/ser/trait.Serializer.js | 2 +- main/implementors/std/io/trait.Read.js | 2 +- main/pot/de/struct.Deserializer.html | 124 +++++++++--------- main/pot/enum.Error.html | 18 +-- main/pot/enum.Value.html | 40 +++--- main/pot/enum.ValueError.html | 24 ++-- main/pot/fn.from_reader.html | 2 +- main/pot/fn.from_slice.html | 2 +- main/pot/fn.to_vec.html | 2 +- main/pot/fn.to_writer.html | 2 +- main/pot/format/struct.Float.html | 12 +- main/pot/format/struct.Integer.html | 12 +- main/pot/index.html | 4 +- main/pot/reader/struct.SliceReader.html | 2 +- main/pot/ser/struct.MapSerializer.html | 16 +-- main/pot/ser/struct.Serializer.html | 68 +++++----- main/pot/struct.Config.html | 8 +- main/pot/struct.OwnedValue.html | 38 +++--- main/pot/type.Result.html | 2 +- main/search-index.js | 2 +- main/src/pot/lib.rs.html | 44 ++++++- main/src/pot/value.rs.html | 68 +++------- 44 files changed, 277 insertions(+), 261 deletions(-) diff --git a/main/implementors/core/clone/trait.Clone.js b/main/implementors/core/clone/trait.Clone.js index 874742ab..3dd1f966 100644 --- a/main/implementors/core/clone/trait.Clone.js +++ b/main/implementors/core/clone/trait.Clone.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'a> Clone for Value<'a>"],["impl Clone for Integer"],["impl Clone for Float"],["impl Clone for Kind"],["impl Clone for Config"],["impl Clone for OwnedValue"]] +"pot":[["impl Clone for Float"],["impl Clone for Kind"],["impl<'a> Clone for Value<'a>"],["impl Clone for OwnedValue"],["impl Clone for Integer"],["impl Clone for Config"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/core/cmp/trait.PartialEq.js b/main/implementors/core/cmp/trait.PartialEq.js index 702749b1..d41c65e4 100644 --- a/main/implementors/core/cmp/trait.PartialEq.js +++ b/main/implementors/core/cmp/trait.PartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl PartialEq<Kind> for Kind"],["impl PartialEq<OwnedValue> for OwnedValue"],["impl PartialEq<Integer> for Integer"],["impl PartialEq<Float> for Float"],["impl<'a> PartialEq<Value<'a>> for Value<'a>"]] +"pot":[["impl PartialEq<OwnedValue> for OwnedValue"],["impl PartialEq<Kind> for Kind"],["impl PartialEq<ValueError> for ValueError"],["impl PartialEq<Float> for Float"],["impl PartialEq<Integer> for Integer"],["impl<'a> PartialEq<Value<'a>> for Value<'a>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/core/convert/trait.From.js b/main/implementors/core/convert/trait.From.js index b8c1085d..c3e71f91 100644 --- a/main/implementors/core/convert/trait.From.js +++ b/main/implementors/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl From<FromUtf8Error> for Error"],["impl From<u32> for Integer"],["impl<'a> From<Option<Value<'a>>> for Value<'a>"],["impl From<u64> for Integer"],["impl From<f32> for Float"],["impl<'a> From<i32> for Value<'a>"],["impl<'a> From<&'a [u8]> for SliceReader<'a>"],["impl<'a> From<u64> for Value<'a>"],["impl From<i16> for Integer"],["impl<'a> From<i16> for Value<'a>"],["impl From<u16> for Integer"],["impl<'a> From<()> for Value<'a>"],["impl From<Error> for Error"],["impl<'a> From<Vec<Value<'a>, Global>> for Value<'a>"],["impl From<i64> for Integer"],["impl<'a> From<f32> for Value<'a>"],["impl<'a> From<u32> for Value<'a>"],["impl<'a> From<i8> for Value<'a>"],["impl<'a> From<u8> for Value<'a>"],["impl From<i8> for Integer"],["impl<'a, const N: usize> From<&'a [u8; N]> for Value<'a>"],["impl<'a> From<u128> for Value<'a>"],["impl<'a> From<i64> for Value<'a>"],["impl<'a> From<f64> for Value<'a>"],["impl<'a> From<&'a [u8]> for Value<'a>"],["impl From<f64> for Float"],["impl From<u8> for Integer"],["impl<'a> From<Vec<(Value<'a>, Value<'a>), Global>> for Value<'a>"],["impl<'a> From<SliceReader<'a>> for &'a [u8]"],["impl<'a> From<Vec<u8, Global>> for Value<'a>"],["impl From<i128> for Integer"],["impl<'a> From<u16> for Value<'a>"],["impl<'a> From<i128> for Value<'a>"],["impl From<i32> for Integer"],["impl From<Utf8Error> for Error"],["impl<'a> From<String> for Value<'a>"],["impl<'a> From<&'a str> for Value<'a>"],["impl From<u128> for Integer"],["impl<'a> From<bool> for Value<'a>"]] +"pot":[["impl<'a> From<u8> for Value<'a>"],["impl<'a> From<Vec<u8, Global>> for Value<'a>"],["impl<'a> From<bool> for Value<'a>"],["impl<'a> From<f64> for Value<'a>"],["impl<'a> From<()> for Value<'a>"],["impl<'a> From<&'a [u8]> for Value<'a>"],["impl<'a> From<u32> for Value<'a>"],["impl From<u32> for Integer"],["impl From<i16> for Integer"],["impl<'a> From<u16> for Value<'a>"],["impl<'a> From<Vec<(Value<'a>, Value<'a>), Global>> for Value<'a>"],["impl<'a> From<Vec<Value<'a>, Global>> for Value<'a>"],["impl From<u16> for Integer"],["impl From<i32> for Integer"],["impl From<i128> for Integer"],["impl<'a> From<i128> for Value<'a>"],["impl<'a> From<i32> for Value<'a>"],["impl<'a> From<SliceReader<'a>> for &'a [u8]"],["impl From<u128> for Integer"],["impl From<u64> for Integer"],["impl<'a> From<i64> for Value<'a>"],["impl<'a> From<&'a str> for Value<'a>"],["impl From<FromUtf8Error> for Error"],["impl<'a> From<i8> for Value<'a>"],["impl<'a> From<String> for Value<'a>"],["impl From<u8> for Integer"],["impl From<Utf8Error> for Error"],["impl<'a> From<f32> for Value<'a>"],["impl<'a> From<&'a [u8]> for SliceReader<'a>"],["impl From<Error> for Error"],["impl From<f32> for Float"],["impl<'a, const N: usize> From<&'a [u8; N]> for Value<'a>"],["impl From<i8> for Integer"],["impl<'a> From<u64> for Value<'a>"],["impl<'a> From<u128> for Value<'a>"],["impl<'a> From<i16> for Value<'a>"],["impl From<f64> for Float"],["impl<'a> From<Option<Value<'a>>> for Value<'a>"],["impl From<i64> for Integer"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/core/fmt/trait.Debug.js b/main/implementors/core/fmt/trait.Debug.js index 16fcb747..18e65623 100644 --- a/main/implementors/core/fmt/trait.Debug.js +++ b/main/implementors/core/fmt/trait.Debug.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'a> Debug for SliceReader<'a>"],["impl<'a, 'de> Debug for SymbolMap<'a, 'de>"],["impl Debug for Kind"],["impl Debug for SymbolMap"],["impl Debug for Float"],["impl Debug for Config"],["impl<'s, 'de, R: Reader<'de>> Debug for Deserializer<'s, 'de, R>"],["impl<'a> Debug for Value<'a>"],["impl Debug for Error"],["impl Debug for Integer"],["impl Debug for ValueError"],["impl<'a, W: WriteBytesExt> Debug for Serializer<'a, W>"],["impl<'de> Debug for Nucleus<'de>"],["impl<'de> Debug for Atom<'de>"],["impl Debug for OwnedValue"]] +"pot":[["impl<'a> Debug for SliceReader<'a>"],["impl<'a, 'de> Debug for SymbolMap<'a, 'de>"],["impl Debug for Config"],["impl Debug for Float"],["impl Debug for ValueError"],["impl<'s, 'de, R: Reader<'de>> Debug for Deserializer<'s, 'de, R>"],["impl<'de> Debug for Atom<'de>"],["impl Debug for Integer"],["impl<'de> Debug for Nucleus<'de>"],["impl Debug for Error"],["impl<'a, W: WriteBytesExt> Debug for Serializer<'a, W>"],["impl Debug for OwnedValue"],["impl Debug for SymbolMap"],["impl<'a> Debug for Value<'a>"],["impl Debug for Kind"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/core/fmt/trait.Display.js b/main/implementors/core/fmt/trait.Display.js index 8436f990..5e89a343 100644 --- a/main/implementors/core/fmt/trait.Display.js +++ b/main/implementors/core/fmt/trait.Display.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl Display for Integer"],["impl Display for Float"],["impl Display for ValueError"],["impl<'a> Display for Value<'a>"],["impl Display for Error"]] +"pot":[["impl Display for ValueError"],["impl<'a> Display for Value<'a>"],["impl Display for Integer"],["impl Display for Float"],["impl Display for Error"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/core/marker/trait.Copy.js b/main/implementors/core/marker/trait.Copy.js index 71b0824e..cb2dc052 100644 --- a/main/implementors/core/marker/trait.Copy.js +++ b/main/implementors/core/marker/trait.Copy.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl Copy for Integer"],["impl Copy for Float"],["impl Copy for Kind"]] +"pot":[["impl Copy for Kind"],["impl Copy for Integer"],["impl Copy for Float"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/core/marker/trait.StructuralEq.js b/main/implementors/core/marker/trait.StructuralEq.js index a9d1ef0d..5441ede1 100644 --- a/main/implementors/core/marker/trait.StructuralEq.js +++ b/main/implementors/core/marker/trait.StructuralEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl StructuralEq for Kind"],["impl StructuralEq for Integer"]] +"pot":[["impl StructuralEq for Integer"],["impl StructuralEq for Kind"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/core/marker/trait.StructuralPartialEq.js b/main/implementors/core/marker/trait.StructuralPartialEq.js index a5733faf..b431e054 100644 --- a/main/implementors/core/marker/trait.StructuralPartialEq.js +++ b/main/implementors/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl StructuralPartialEq for Kind"],["impl<'a> StructuralPartialEq for Value<'a>"],["impl StructuralPartialEq for OwnedValue"],["impl StructuralPartialEq for Integer"],["impl StructuralPartialEq for Float"]] +"pot":[["impl StructuralPartialEq for OwnedValue"],["impl StructuralPartialEq for Integer"],["impl StructuralPartialEq for ValueError"],["impl StructuralPartialEq for Kind"],["impl StructuralPartialEq for Float"],["impl<'a> StructuralPartialEq for Value<'a>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/de/trait.Deserialize.js b/main/implementors/serde/de/trait.Deserialize.js index 1fed8d03..ee92458f 100644 --- a/main/implementors/serde/de/trait.Deserialize.js +++ b/main/implementors/serde/de/trait.Deserialize.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de> Deserialize<'de> for Integer"],["impl<'de> Deserialize<'de> for OwnedValue"],["impl<'de: 'a, 'a> Deserialize<'de> for Value<'a>"],["impl<'de> Deserialize<'de> for Float"]] +"pot":[["impl<'de: 'a, 'a> Deserialize<'de> for Value<'a>"],["impl<'de> Deserialize<'de> for OwnedValue"],["impl<'de> Deserialize<'de> for Integer"],["impl<'de> Deserialize<'de> for Float"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/de/trait.Deserializer.js b/main/implementors/serde/de/trait.Deserializer.js index 9bc09cbe..075f3ab9 100644 --- a/main/implementors/serde/de/trait.Deserializer.js +++ b/main/implementors/serde/de/trait.Deserializer.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'a, 'de, 's, R: Reader<'de>> Deserializer<'de> for &'a mut Deserializer<'s, 'de, R>"]] +"pot":[["impl<'a, 'de, 's, R: Reader<'de>> Deserializer<'de> for &'a mut Deserializer<'s, 'de, R>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/de/trait.EnumAccess.js b/main/implementors/serde/de/trait.EnumAccess.js index 8041b299..57300fd0 100644 --- a/main/implementors/serde/de/trait.EnumAccess.js +++ b/main/implementors/serde/de/trait.EnumAccess.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'a, 's, 'de, R: Reader<'de>> EnumAccess<'de> for &'a mut Deserializer<'s, 'de, R>"]] +"pot":[["impl<'a, 's, 'de, R: Reader<'de>> EnumAccess<'de> for &'a mut Deserializer<'s, 'de, R>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/de/trait.Error.js b/main/implementors/serde/de/trait.Error.js index 2452977d..7df20e09 100644 --- a/main/implementors/serde/de/trait.Error.js +++ b/main/implementors/serde/de/trait.Error.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl Error for Error"],["impl Error for ValueError"]] +"pot":[["impl Error for ValueError"],["impl Error for Error"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/de/trait.VariantAccess.js b/main/implementors/serde/de/trait.VariantAccess.js index beb8541c..4f1cc714 100644 --- a/main/implementors/serde/de/trait.VariantAccess.js +++ b/main/implementors/serde/de/trait.VariantAccess.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'a, 's, 'de, R: Reader<'de>> VariantAccess<'de> for &'a mut Deserializer<'s, 'de, R>"]] +"pot":[["impl<'a, 's, 'de, R: Reader<'de>> VariantAccess<'de> for &'a mut Deserializer<'s, 'de, R>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.Error.js b/main/implementors/serde/ser/trait.Error.js index 2278fb25..dc021f3e 100644 --- a/main/implementors/serde/ser/trait.Error.js +++ b/main/implementors/serde/ser/trait.Error.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl Error for Error"]] +"pot":[["impl Error for Error"],["impl Error for ValueError"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.Serialize.js b/main/implementors/serde/ser/trait.Serialize.js index 78ef3a12..64aba77a 100644 --- a/main/implementors/serde/ser/trait.Serialize.js +++ b/main/implementors/serde/ser/trait.Serialize.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl Serialize for Integer"],["impl<'a> Serialize for Value<'a>"],["impl Serialize for Float"],["impl Serialize for OwnedValue"]] +"pot":[["impl Serialize for OwnedValue"],["impl Serialize for Float"],["impl Serialize for Integer"],["impl<'a> Serialize for Value<'a>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.SerializeMap.js b/main/implementors/serde/ser/trait.SerializeMap.js index 24c03ede..2eed7331 100644 --- a/main/implementors/serde/ser/trait.SerializeMap.js +++ b/main/implementors/serde/ser/trait.SerializeMap.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeMap for MapSerializer<'de, 'a, W>"]] +"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeMap for MapSerializer<'de, 'a, W>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.SerializeSeq.js b/main/implementors/serde/ser/trait.SerializeSeq.js index 2e1ca6c2..e3872dab 100644 --- a/main/implementors/serde/ser/trait.SerializeSeq.js +++ b/main/implementors/serde/ser/trait.SerializeSeq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeSeq for &'de mut Serializer<'a, W>"]] +"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeSeq for &'de mut Serializer<'a, W>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.SerializeStruct.js b/main/implementors/serde/ser/trait.SerializeStruct.js index 0d998bca..88452797 100644 --- a/main/implementors/serde/ser/trait.SerializeStruct.js +++ b/main/implementors/serde/ser/trait.SerializeStruct.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeStruct for MapSerializer<'de, 'a, W>"]] +"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeStruct for MapSerializer<'de, 'a, W>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.SerializeStructVariant.js b/main/implementors/serde/ser/trait.SerializeStructVariant.js index 37d2ba0f..ef6971b0 100644 --- a/main/implementors/serde/ser/trait.SerializeStructVariant.js +++ b/main/implementors/serde/ser/trait.SerializeStructVariant.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeStructVariant for MapSerializer<'de, 'a, W>"]] +"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeStructVariant for MapSerializer<'de, 'a, W>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.SerializeTuple.js b/main/implementors/serde/ser/trait.SerializeTuple.js index 5a7ffcf0..491fb7fb 100644 --- a/main/implementors/serde/ser/trait.SerializeTuple.js +++ b/main/implementors/serde/ser/trait.SerializeTuple.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTuple for &'de mut Serializer<'a, W>"]] +"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTuple for &'de mut Serializer<'a, W>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.SerializeTupleStruct.js b/main/implementors/serde/ser/trait.SerializeTupleStruct.js index 2aec24fd..521dc867 100644 --- a/main/implementors/serde/ser/trait.SerializeTupleStruct.js +++ b/main/implementors/serde/ser/trait.SerializeTupleStruct.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTupleStruct for &'de mut Serializer<'a, W>"]] +"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTupleStruct for &'de mut Serializer<'a, W>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.SerializeTupleVariant.js b/main/implementors/serde/ser/trait.SerializeTupleVariant.js index 68039b62..6b10a54a 100644 --- a/main/implementors/serde/ser/trait.SerializeTupleVariant.js +++ b/main/implementors/serde/ser/trait.SerializeTupleVariant.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTupleVariant for &'de mut Serializer<'a, W>"]] +"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTupleVariant for &'de mut Serializer<'a, W>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/serde/ser/trait.Serializer.js b/main/implementors/serde/ser/trait.Serializer.js index 9ceaf42e..4fdfba18 100644 --- a/main/implementors/serde/ser/trait.Serializer.js +++ b/main/implementors/serde/ser/trait.Serializer.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> Serializer for &'de mut Serializer<'a, W>"]] +"pot":[["impl<'de, 'a: 'de, W: WriteBytesExt + 'a> Serializer for &'de mut Serializer<'a, W>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/implementors/std/io/trait.Read.js b/main/implementors/std/io/trait.Read.js index bb0b3f7d..433ceeef 100644 --- a/main/implementors/std/io/trait.Read.js +++ b/main/implementors/std/io/trait.Read.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<R: ReadBytesExt> Read for IoReader<R>"],["impl<'a> Read for SliceReader<'a>"]] +"pot":[["impl<'a> Read for SliceReader<'a>"],["impl<R: ReadBytesExt> Read for IoReader<R>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/pot/de/struct.Deserializer.html b/main/pot/de/struct.Deserializer.html index fac41975..95c610fd 100644 --- a/main/pot/de/struct.Deserializer.html +++ b/main/pot/de/struct.Deserializer.html @@ -1,92 +1,92 @@ Deserializer in pot::de - Rust

Struct pot::de::Deserializer

source ·
pub struct Deserializer<'s, 'de, R: Reader<'de>> { /* private fields */ }
Expand description

Deserializer for the Pot format.

Implementations§

source§

impl<'s, 'de> Deserializer<'s, 'de, SliceReader<'de>>

source

pub fn end_of_input(&self) -> bool

Returns true if the input has been consumed completely.

-

Trait Implementations§

source§

impl<'s, 'de, R: Reader<'de>> Debug for Deserializer<'s, 'de, R>

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, 'de, 's, R: Reader<'de>> Deserializer<'de> for &'a mut Deserializer<'s, 'de, R>

§

type Error = Error

The error type that can be returned if some error occurs during -deserialization.
source§

fn is_human_readable(&self) -> bool

Determine whether Deserialize implementations should expect to -deserialize their human-readable form. Read more
source§

fn deserialize_any<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Require the Deserializer to figure out how to drive the visitor based -on what data type is in the input. Read more
source§

fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a bool value.
source§

fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting an i8 value.
source§

fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting an i16 value.
source§

fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting an i32 value.
source§

fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting an i64 value.
source§

fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting an i128 value. Read more
source§

fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a u8 value.
source§

fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a u16 value.
source§

fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a u32 value.
source§

fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a u64 value.
source§

fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting an u128 value. Read more
source§

fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a f32 value.
source§

fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a f64 value.
source§

fn deserialize_char<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a char value.
source§

fn deserialize_str<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a string value and does +

Trait Implementations§

source§

impl<'s, 'de, R: Reader<'de>> Debug for Deserializer<'s, 'de, R>

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, 'de, 's, R: Reader<'de>> Deserializer<'de> for &'a mut Deserializer<'s, 'de, R>

§

type Error = Error

The error type that can be returned if some error occurs during +deserialization.
source§

fn is_human_readable(&self) -> bool

Determine whether Deserialize implementations should expect to +deserialize their human-readable form. Read more
source§

fn deserialize_any<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Require the Deserializer to figure out how to drive the visitor based +on what data type is in the input. Read more
source§

fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a bool value.
source§

fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting an i8 value.
source§

fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting an i16 value.
source§

fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting an i32 value.
source§

fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting an i64 value.
source§

fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting an i128 value. Read more
source§

fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a u8 value.
source§

fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a u16 value.
source§

fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a u32 value.
source§

fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a u64 value.
source§

fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting an u128 value. Read more
source§

fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a f32 value.
source§

fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a f64 value.
source§

fn deserialize_char<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a char value.
source§

fn deserialize_str<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a string value and does not benefit from taking ownership of buffered data owned by the -Deserializer. Read more
source§

fn deserialize_string<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a string value and would +Deserializer. Read more
source§

fn deserialize_string<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a string value and would benefit from taking ownership of buffered data owned by the -Deserializer. Read more
source§

fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a byte array and does not +Deserializer. Read more
source§

fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a byte array and does not benefit from taking ownership of buffered data owned by the -Deserializer. Read more
source§

fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a byte array and would +Deserializer. Read more
source§

fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a byte array and would benefit from taking ownership of buffered data owned by the -Deserializer. Read more
source§

fn deserialize_option<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting an optional value. Read more
source§

fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a unit value.
source§

fn deserialize_unit_struct<V>( +Deserializer. Read more

source§

fn deserialize_option<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting an optional value. Read more
source§

fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a unit value.
source§

fn deserialize_unit_struct<V>( self, _name: &'static str, visitor: V -) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a unit struct with a -particular name.
source§

fn deserialize_newtype_struct<V>( +) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a unit struct with a +particular name.
source§

fn deserialize_newtype_struct<V>( self, _name: &'static str, visitor: V -) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a newtype struct with a -particular name.
source§

fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a sequence of values.
source§

fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a sequence of values and -knows how many values there are without looking at the serialized data.
source§

fn deserialize_tuple_struct<V>( +) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a newtype struct with a +particular name.
source§

fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a sequence of values.
source§

fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a sequence of values and +knows how many values there are without looking at the serialized data.
source§

fn deserialize_tuple_struct<V>( self, _name: &'static str, _len: usize, visitor: V -) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a tuple struct with a -particular name and number of fields.
source§

fn deserialize_map<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a map of key-value pairs.
source§

fn deserialize_struct<V>( +) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a tuple struct with a +particular name and number of fields.
source§

fn deserialize_map<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a map of key-value pairs.
source§

fn deserialize_struct<V>( self, _name: &'static str, _fields: &'static [&'static str], visitor: V -) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting a struct with a particular -name and fields.
source§

fn deserialize_enum<V>( +) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting a struct with a particular +name and fields.
source§

fn deserialize_enum<V>( self, _name: &'static str, _variants: &'static [&'static str], visitor: V -) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting an enum value with a -particular name and possible variants.
source§

fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type is expecting the name of a struct -field or the discriminant of an enum variant.
source§

fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Hint that the Deserialize type needs to deserialize a value whose type -doesn’t matter because it is ignored. Read more
source§

impl<'a, 's, 'de, R: Reader<'de>> EnumAccess<'de> for &'a mut Deserializer<'s, 'de, R>

§

type Error = Error

The error type that can be returned if some error occurs during -deserialization.
§

type Variant = &'a mut Deserializer<'s, 'de, R>

The Visitor that will be used to deserialize the content of the enum -variant.
source§

fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant)>where - V: DeserializeSeed<'de>,

variant is called to identify which variant to deserialize. Read more
source§

fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error>where - V: Deserialize<'de>,

variant is called to identify which variant to deserialize. Read more
source§

impl<'a, 's, 'de, R: Reader<'de>> VariantAccess<'de> for &'a mut Deserializer<'s, 'de, R>

§

type Error = Error

The error type that can be returned if some error occurs during -deserialization. Must match the error type of our EnumAccess.
source§

fn unit_variant(self) -> Result<()>

Called when deserializing a variant with no values. Read more
source§

fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value>where - T: DeserializeSeed<'de>,

Called when deserializing a variant with a single value. Read more
source§

fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value>where - V: Visitor<'de>,

Called when deserializing a tuple-like variant. Read more
source§

fn struct_variant<V>( +) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting an enum value with a +particular name and possible variants.
source§

fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type is expecting the name of a struct +field or the discriminant of an enum variant.
source§

fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Hint that the Deserialize type needs to deserialize a value whose type +doesn’t matter because it is ignored. Read more
source§

impl<'a, 's, 'de, R: Reader<'de>> EnumAccess<'de> for &'a mut Deserializer<'s, 'de, R>

§

type Error = Error

The error type that can be returned if some error occurs during +deserialization.
§

type Variant = &'a mut Deserializer<'s, 'de, R>

The Visitor that will be used to deserialize the content of the enum +variant.
source§

fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant)>where + V: DeserializeSeed<'de>,

variant is called to identify which variant to deserialize. Read more
source§

fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error>where + V: Deserialize<'de>,

variant is called to identify which variant to deserialize. Read more
source§

impl<'a, 's, 'de, R: Reader<'de>> VariantAccess<'de> for &'a mut Deserializer<'s, 'de, R>

§

type Error = Error

The error type that can be returned if some error occurs during +deserialization. Must match the error type of our EnumAccess.
source§

fn unit_variant(self) -> Result<()>

Called when deserializing a variant with no values. Read more
source§

fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value>where + T: DeserializeSeed<'de>,

Called when deserializing a variant with a single value. Read more
source§

fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value>where + V: Visitor<'de>,

Called when deserializing a tuple-like variant. Read more
source§

fn struct_variant<V>( self, _fields: &'static [&'static str], visitor: V -) -> Result<V::Value>where - V: Visitor<'de>,

Called when deserializing a struct-like variant. Read more
source§

fn newtype_variant<T>(self) -> Result<T, Self::Error>where - T: Deserialize<'de>,

Called when deserializing a variant with a single value. Read more

Auto Trait Implementations§

§

impl<'s, 'de, R> RefUnwindSafe for Deserializer<'s, 'de, R>where +) -> Result<V::Value>where + V: Visitor<'de>,

Called when deserializing a struct-like variant. Read more
source§

fn newtype_variant<T>(self) -> Result<T, Self::Error>where + T: Deserialize<'de>,

Called when deserializing a variant with a single value. Read more

Auto Trait Implementations§

§

impl<'s, 'de, R> RefUnwindSafe for Deserializer<'s, 'de, R>where R: RefUnwindSafe,

§

impl<'s, 'de, R> Send for Deserializer<'s, 'de, R>where R: Send,

§

impl<'s, 'de, R> Sync for Deserializer<'s, 'de, R>where R: Sync,

§

impl<'s, 'de, R> Unpin for Deserializer<'s, 'de, R>where diff --git a/main/pot/enum.Error.html b/main/pot/enum.Error.html index aa133b03..3220e2e4 100644 --- a/main/pot/enum.Error.html +++ b/main/pot/enum.Error.html @@ -28,16 +28,16 @@

§

UnknownSymbol(u64)

A requested symbol id was not found.

§

InvalidAtomHeader

An atom header was incorrectly formatted.

§

TooManyBytesRead

The amount of data read exceeds the configured maximum number of bytes.

-

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn custom<T: Display>(msg: T) -> Self

Used when a Serialize implementation encounters any error -while serializing a type. Read more
source§

impl Error for Error

source§

fn custom<T: Display>(msg: T) -> Self

Raised when there is general error when deserializing a type. Read more
source§

fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a type different from what it was -expecting. Read more
source§

fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a value of the right type but that -is wrong for some other reason. Read more
source§

fn invalid_length(len: usize, exp: &dyn Expected) -> Self

Raised when deserializing a sequence or map and the input data contains -too many or too few elements. Read more
source§

fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize enum type received a variant with an -unrecognized name.
source§

fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize struct type received a field with an -unrecognized name.
source§

fn missing_field(field: &'static str) -> Self

Raised when a Deserialize struct type expected to receive a required +

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl Error for Error

source§

fn custom<T: Display>(msg: T) -> Self

Used when a Serialize implementation encounters any error +while serializing a type. Read more
source§

impl Error for Error

source§

fn custom<T: Display>(msg: T) -> Self

Raised when there is general error when deserializing a type. Read more
source§

fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a type different from what it was +expecting. Read more
source§

fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a value of the right type but that +is wrong for some other reason. Read more
source§

fn invalid_length(len: usize, exp: &dyn Expected) -> Self

Raised when deserializing a sequence or map and the input data contains +too many or too few elements. Read more
source§

fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize enum type received a variant with an +unrecognized name.
source§

fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize struct type received a field with an +unrecognized name.
source§

fn missing_field(field: &'static str) -> Self

Raised when a Deserialize struct type expected to receive a required field with a particular name but that field was not present in the -input.
source§

fn duplicate_field(field: &'static str) -> Self

Raised when a Deserialize struct type received more than one of the -same field.
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromUtf8Error> for Error

source§

fn from(err: FromUtf8Error) -> Self

Converts to this type from the input type.
source§

impl From<Utf8Error> for Error

source§

fn from(err: Utf8Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for Twhere +input.

source§

fn duplicate_field(field: &'static str) -> Self

Raised when a Deserialize struct type received more than one of the +same field.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromUtf8Error> for Error

source§

fn from(err: FromUtf8Error) -> Self

Converts to this type from the input type.
source§

impl From<Utf8Error> for Error

source§

fn from(err: Utf8Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/main/pot/enum.Value.html b/main/pot/enum.Value.html index e0430dac..580ca313 100644 --- a/main/pot/enum.Value.html +++ b/main/pot/enum.Value.html @@ -19,7 +19,7 @@
§

String(Cow<'a, str>)

A string value.

§

Sequence(Vec<Self>)

A sequence of values.

§

Mappings(Vec<(Self, Self)>)

A sequence of key-value mappings.

-

Implementations§

source§

impl<'a> Value<'a>

source

pub fn from_serialize<T: Serialize>(value: T) -> Self

Creates a Value from the given Serde-compatible type.

+

Implementations§

source§

impl<'a> Value<'a>

source

pub fn from_serialize<T: Serialize>(value: T) -> Result<Self, ValueError>

Creates a Value from the given Serde-compatible type.

use pot::Value;
 use serde::Serialize;
@@ -39,7 +39,7 @@
         Value::from(String::from("World"))
     ])
 );
-
source

pub fn deserialize_as<'de, T: Deserialize<'de>>( +

source

pub fn deserialize_as<'de, T: Deserialize<'de>>( &'de self ) -> Result<T, ValueError>

Attempts to create an instance of T from this value.

@@ -56,19 +56,19 @@ let serialized = Value::from_serialize(&original); let deserialized: Vec<Example> = serialized.deserialize_as().unwrap(); assert_eq!(deserialized, original);
-
source

pub fn from_sequence<IntoIter: IntoIterator<Item = T>, T: Into<Self>>( +

source

pub fn from_sequence<IntoIter: IntoIterator<Item = T>, T: Into<Self>>( sequence: IntoIter ) -> Self

Returns a new value from an iterator of items that can be converted into a value.

let mappings = Value::from_sequence(Vec::<String>::new());
 assert!(matches!(mappings, Value::Sequence(_)));
-
source

pub fn from_mappings<IntoIter: IntoIterator<Item = (K, V)>, K: Into<Self>, V: Into<Self>>( +

source

pub fn from_mappings<IntoIter: IntoIterator<Item = (K, V)>, K: Into<Self>, V: Into<Self>>( mappings: IntoIter ) -> Self

Returns a new value from an iterator of 2-element tuples representing key-value pairs.

let mappings = Value::from_mappings(HashMap::<String, u32>::new());
 assert!(matches!(mappings, Value::Mappings(_)));
-
source

pub fn is_empty(&self) -> bool

Returns true if the value contained is considered empty.

+
source

pub fn is_empty(&self) -> bool

Returns true if the value contained is considered empty.

// Value::None is always empty.
 assert_eq!(Value::None.is_empty(), true);
@@ -95,7 +95,7 @@
     Value::from(vec![(Value::None, Value::None)]).is_empty(),
     false
 );
-
source

pub fn as_bool(&self) -> bool

Returns the value as a bool.

+
source

pub fn as_bool(&self) -> bool

Returns the value as a bool.

// Value::None is always false.
 assert_eq!(Value::None.as_bool(), false);
@@ -129,34 +129,34 @@
     Value::from(vec![(Value::None, Value::None)]).as_bool(),
     true
 );
-
source

pub fn as_integer(&self) -> Option<Integer>

Returns the value as an Integer. Returns None if the value is not a +

source

pub fn as_integer(&self) -> Option<Integer>

Returns the value as an Integer. Returns None if the value is not a Self::Float or Self::Integer. Also returns None if the value is a float, but cannot be losslessly converted to an integer.

-
source

pub fn as_float(&self) -> Option<Float>

Returns the value as an Float. Returns None if the value is not a +

source

pub fn as_float(&self) -> Option<Float>

Returns the value as an Float. Returns None if the value is not a Self::Float or Self::Integer. Also returns None if the value is an integer, but cannot be losslessly converted to a float.

-
source

pub fn as_str(&self) -> Option<&str>

Returns the value as a string, or None if the value is not representable +

source

pub fn as_str(&self) -> Option<&str>

Returns the value as a string, or None if the value is not representable by a string. This will only return a value with variants Self::String and Self::Bytes. Bytes will only be returned if the contained bytes can be safely interpretted as UTF-8.

-
source

pub fn as_bytes(&self) -> Option<&[u8]>

Returns the value as bytes, or None if the value is not stored as a +

source

pub fn as_bytes(&self) -> Option<&[u8]>

Returns the value as bytes, or None if the value is not stored as a representation of bytes. This will only return a value with variants Self::String and Self::Bytes.

-
source

pub fn values(&self) -> SequenceIter<'_>

Returns an iterator that iterates over all values contained inside of +

source

pub fn values(&self) -> SequenceIter<'_>

Returns an iterator that iterates over all values contained inside of this value. Returns an empty iterator if not a Self::Sequence or Self::Mappings. If a Self::Mappings, only the value portion of the mapping is returned.

-
source

pub fn mappings(&self) -> Iter<'_, (Self, Self)>

Returns an iterator that iterates over all mappings contained inside of +

source

pub fn mappings(&self) -> Iter<'_, (Self, Self)>

Returns an iterator that iterates over all mappings contained inside of this value. Returns an empty iterator if not a Self::Sequence or Self::Mappings. If a Self::Sequence, the key will always be Self::None.

-
source

pub fn into_static(self) -> Value<'static>

Converts self to a 'static lifetime by cloning any borrowed data.

-
source

pub fn to_static(&self) -> Value<'static>

Converts self to a 'static lifetime by cloning all data.

-

Trait Implementations§

source§

impl<'a> Clone for Value<'a>

source§

fn clone(&self) -> Value<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for Value<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de: 'a, 'a> Deserialize<'de> for Value<'a>

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'a> Display for Value<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a [u8]> for Value<'a>

source§

fn from(bytes: &'a [u8]) -> Self

Converts to this type from the input type.
source§

impl<'a, const N: usize> From<&'a [u8; N]> for Value<'a>

source§

fn from(bytes: &'a [u8; N]) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for Value<'a>

source§

fn from(string: &'a str) -> Self

Converts to this type from the input type.
source§

impl<'a> From<()> for Value<'a>

source§

fn from(_: ()) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<Value<'a>>> for Value<'a>

source§

fn from(value: Option<Value<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<String> for Value<'a>

source§

fn from(string: String) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Vec<(Value<'a>, Value<'a>), Global>> for Value<'a>

source§

fn from(value: Vec<(Value<'a>, Value<'a>)>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Vec<Value<'a>, Global>> for Value<'a>

source§

fn from(value: Vec<Value<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Vec<u8, Global>> for Value<'a>

source§

fn from(bytes: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<bool> for Value<'a>

source§

fn from(value: bool) -> Self

Converts to this type from the input type.
source§

impl<'a> From<f32> for Value<'a>

source§

fn from(value: f32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<f64> for Value<'a>

source§

fn from(value: f64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i128> for Value<'a>

source§

fn from(value: i128) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i16> for Value<'a>

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i32> for Value<'a>

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i64> for Value<'a>

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i8> for Value<'a>

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u128> for Value<'a>

source§

fn from(value: u128) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u16> for Value<'a>

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u32> for Value<'a>

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u64> for Value<'a>

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u8> for Value<'a>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<'a> PartialEq<Value<'a>> for Value<'a>

source§

fn eq(&self, other: &Value<'a>) -> bool

This method tests for self and other values to be equal, and is used +
source

pub fn into_static(self) -> Value<'static>

Converts self to a 'static lifetime by cloning any borrowed data.

+
source

pub fn to_static(&self) -> Value<'static>

Converts self to a 'static lifetime by cloning all data.

+

Trait Implementations§

source§

impl<'a> Clone for Value<'a>

source§

fn clone(&self) -> Value<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for Value<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de: 'a, 'a> Deserialize<'de> for Value<'a>

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'a> Display for Value<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a [u8]> for Value<'a>

source§

fn from(bytes: &'a [u8]) -> Self

Converts to this type from the input type.
source§

impl<'a, const N: usize> From<&'a [u8; N]> for Value<'a>

source§

fn from(bytes: &'a [u8; N]) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for Value<'a>

source§

fn from(string: &'a str) -> Self

Converts to this type from the input type.
source§

impl<'a> From<()> for Value<'a>

source§

fn from(_: ()) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<Value<'a>>> for Value<'a>

source§

fn from(value: Option<Value<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<String> for Value<'a>

source§

fn from(string: String) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Vec<(Value<'a>, Value<'a>), Global>> for Value<'a>

source§

fn from(value: Vec<(Value<'a>, Value<'a>)>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Vec<Value<'a>, Global>> for Value<'a>

source§

fn from(value: Vec<Value<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Vec<u8, Global>> for Value<'a>

source§

fn from(bytes: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<bool> for Value<'a>

source§

fn from(value: bool) -> Self

Converts to this type from the input type.
source§

impl<'a> From<f32> for Value<'a>

source§

fn from(value: f32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<f64> for Value<'a>

source§

fn from(value: f64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i128> for Value<'a>

source§

fn from(value: i128) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i16> for Value<'a>

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i32> for Value<'a>

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i64> for Value<'a>

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i8> for Value<'a>

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u128> for Value<'a>

source§

fn from(value: u128) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u16> for Value<'a>

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u32> for Value<'a>

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u64> for Value<'a>

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u8> for Value<'a>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<'a> PartialEq<Value<'a>> for Value<'a>

source§

fn eq(&self, other: &Value<'a>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<'a> Serialize for Value<'a>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'a> StructuralPartialEq for Value<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Value<'a>

§

impl<'a> Send for Value<'a>

§

impl<'a> Sync for Value<'a>

§

impl<'a> Unpin for Value<'a>

§

impl<'a> UnwindSafe for Value<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl<'a> Serialize for Value<'a>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'a> StructuralPartialEq for Value<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Value<'a>

§

impl<'a> Send for Value<'a>

§

impl<'a> Sync for Value<'a>

§

impl<'a> Unpin for Value<'a>

§

impl<'a> UnwindSafe for Value<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

@@ -173,5 +173,5 @@ U: TryFrom<T>,
§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere - T: for<'de> Deserialize<'de>,

\ No newline at end of file +WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/main/pot/enum.ValueError.html b/main/pot/enum.ValueError.html index 2b8cb07e..4218cf46 100644 --- a/main/pot/enum.ValueError.html +++ b/main/pot/enum.ValueError.html @@ -1,4 +1,4 @@ -ValueError in pot - Rust

A kind of data was expected, but the Value cannot be interpreted as that kind.

§

Custom(String)

A custom deserialization error. These errors originate outside of Pot.

-

Trait Implementations§

source§

impl Debug for ValueError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ValueError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ValueError

source§

fn custom<T>(msg: T) -> Selfwhere - T: Display,

Raised when there is general error when deserializing a type. Read more
source§

fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a type different from what it was -expecting. Read more
source§

fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a value of the right type but that -is wrong for some other reason. Read more
source§

fn invalid_length(len: usize, exp: &dyn Expected) -> Self

Raised when deserializing a sequence or map and the input data contains -too many or too few elements. Read more
source§

fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize enum type received a variant with an -unrecognized name.
source§

fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize struct type received a field with an -unrecognized name.
source§

fn missing_field(field: &'static str) -> Self

Raised when a Deserialize struct type expected to receive a required +

Trait Implementations§

source§

impl Debug for ValueError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ValueError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ValueError

source§

fn custom<T>(msg: T) -> Selfwhere + T: Display,

Raised when there is general error when deserializing a type. Read more
source§

fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a type different from what it was +expecting. Read more
source§

fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self

Raised when a Deserialize receives a value of the right type but that +is wrong for some other reason. Read more
source§

fn invalid_length(len: usize, exp: &dyn Expected) -> Self

Raised when deserializing a sequence or map and the input data contains +too many or too few elements. Read more
source§

fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize enum type received a variant with an +unrecognized name.
source§

fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self

Raised when a Deserialize struct type received a field with an +unrecognized name.
source§

fn missing_field(field: &'static str) -> Self

Raised when a Deserialize struct type expected to receive a required field with a particular name but that field was not present in the -input.
source§

fn duplicate_field(field: &'static str) -> Self

Raised when a Deserialize struct type received more than one of the -same field.
source§

impl Error for ValueError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +input.

source§

fn duplicate_field(field: &'static str) -> Self

Raised when a Deserialize struct type received more than one of the +same field.
source§

impl Error for ValueError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl Error for ValueError

source§

fn custom<T>(msg: T) -> Selfwhere + T: Display,

Used when a Serialize implementation encounters any error +while serializing a type. Read more
source§

impl PartialEq<ValueError> for ValueError

source§

fn eq(&self, other: &ValueError) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for ValueError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/main/pot/fn.from_reader.html b/main/pot/fn.from_reader.html index d4a1e6ed..173b543d 100644 --- a/main/pot/fn.from_reader.html +++ b/main/pot/fn.from_reader.html @@ -1,5 +1,5 @@ from_reader in pot - Rust

Function pot::from_reader

source ·
pub fn from_reader<T, R>(reader: R) -> Result<T>where
-    T: DeserializeOwned,
+    T: DeserializeOwned,
     R: Read,
Expand description

Restores a previously Pot-serialized value from a Read implementer.

let mut serialized = Vec::new();
diff --git a/main/pot/fn.from_slice.html b/main/pot/fn.from_slice.html
index fc1972ac..f37c24e0 100644
--- a/main/pot/fn.from_slice.html
+++ b/main/pot/fn.from_slice.html
@@ -1,5 +1,5 @@
 from_slice in pot - Rust

Function pot::from_slice

source ·
pub fn from_slice<'a, T>(serialized: &'a [u8]) -> Result<T>where
-    T: Deserialize<'a>,
Expand description

Restores a previously Pot-serialized value from a slice.

+ T: Deserialize<'a>,
Expand description

Restores a previously Pot-serialized value from a slice.

let serialized = pot::to_vec(&"hello world").unwrap();
 let deserialized = pot::from_slice::<String>(&serialized).unwrap();
diff --git a/main/pot/fn.to_vec.html b/main/pot/fn.to_vec.html
index 1373a256..0aaa89a1 100644
--- a/main/pot/fn.to_vec.html
+++ b/main/pot/fn.to_vec.html
@@ -1,5 +1,5 @@
 to_vec in pot - Rust

Function pot::to_vec

source ·
pub fn to_vec<T>(value: &T) -> Result<Vec<u8>>where
-    T: Serialize,
Expand description

Serialize value using Pot into a Vec<u8>.

+ T: Serialize,
Expand description

Serialize value using Pot into a Vec<u8>.

let serialized = pot::to_vec(&"hello world").unwrap();
 let deserialized = pot::from_slice::<String>(&serialized).unwrap();
diff --git a/main/pot/fn.to_writer.html b/main/pot/fn.to_writer.html
index 52c1381e..97ca16a9 100644
--- a/main/pot/fn.to_writer.html
+++ b/main/pot/fn.to_writer.html
@@ -1,5 +1,5 @@
 to_writer in pot - Rust

Function pot::to_writer

source ·
pub fn to_writer<T, W>(value: &T, writer: W) -> Result<()>where
-    T: Serialize,
+    T: Serialize,
     W: WriteBytesExt,
Expand description

Serialize value using Pot into writer.

let mut serialized = Vec::new();
diff --git a/main/pot/format/struct.Float.html b/main/pot/format/struct.Float.html
index 9c1446e8..47838ca6 100644
--- a/main/pot/format/struct.Float.html
+++ b/main/pot/format/struct.Float.html
@@ -10,11 +10,11 @@
     reader: &mut R
 ) -> Result<Self, Error>

Reads a floating point number given the atom kind and byte_len. byte_len should be the exact argument from the atom header.

-

Trait Implementations§

source§

impl Clone for Float

source§

fn clone(&self) -> Float

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Float

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Float

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Float

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<f32> for Float

source§

fn from(value: f32) -> Self

Converts to this type from the input type.
source§

impl From<f64> for Float

source§

fn from(value: f64) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Float> for Float

source§

fn eq(&self, other: &Float) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl Clone for Float

source§

fn clone(&self) -> Float

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Float

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Float

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Float

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<f32> for Float

source§

fn from(value: f32) -> Self

Converts to this type from the input type.
source§

impl From<f64> for Float

source§

fn from(value: f64) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Float> for Float

source§

fn eq(&self, other: &Float) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Float

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Float

source§

impl StructuralPartialEq for Float

Auto Trait Implementations§

§

impl RefUnwindSafe for Float

§

impl Send for Float

§

impl Sync for Float

§

impl Unpin for Float

§

impl UnwindSafe for Float

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl Serialize for Float

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Float

source§

impl StructuralPartialEq for Float

Auto Trait Implementations§

§

impl RefUnwindSafe for Float

§

impl Send for Float

§

impl Sync for Float

§

impl Unpin for Float

§

impl UnwindSafe for Float

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

@@ -31,5 +31,5 @@ U: TryFrom<T>,
§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere - T: for<'de> Deserialize<'de>,

\ No newline at end of file +WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/main/pot/format/struct.Integer.html b/main/pot/format/struct.Integer.html index fd06972d..4608df5e 100644 --- a/main/pot/format/struct.Integer.html +++ b/main/pot/format/struct.Integer.html @@ -20,11 +20,11 @@
source

pub fn as_f32(&self) -> Result<f32, Error>

Converts this integer to an f32, but only if it can be done without losing precision.

source

pub fn as_f64(&self) -> Result<f64, Error>

Converts this integer to an f64, but only if it can be done without losing precision.

source

pub fn as_float(&self) -> Result<Float, Error>

Converts this integer to an f64, but only if it can be done without losing precision.

-

Trait Implementations§

source§

impl Clone for Integer

source§

fn clone(&self) -> Integer

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Integer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Integer

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Integer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<i128> for Integer

source§

fn from(value: i128) -> Self

Converts to this type from the input type.
source§

impl From<i16> for Integer

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Integer

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for Integer

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Integer

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl From<u128> for Integer

source§

fn from(value: u128) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Integer

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Integer

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for Integer

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Integer

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Integer> for Integer

source§

fn eq(&self, other: &Integer) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl Clone for Integer

source§

fn clone(&self) -> Integer

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Integer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Integer

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Integer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<i128> for Integer

source§

fn from(value: i128) -> Self

Converts to this type from the input type.
source§

impl From<i16> for Integer

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Integer

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for Integer

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Integer

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl From<u128> for Integer

source§

fn from(value: u128) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Integer

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Integer

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for Integer

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Integer

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Integer> for Integer

source§

fn eq(&self, other: &Integer) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Integer

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Integer

source§

impl Eq for Integer

source§

impl StructuralEq for Integer

source§

impl StructuralPartialEq for Integer

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl Serialize for Integer

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Integer

source§

impl Eq for Integer

source§

impl StructuralEq for Integer

source§

impl StructuralPartialEq for Integer

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

@@ -41,5 +41,5 @@ U: TryFrom<T>,
§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere - T: for<'de> Deserialize<'de>,

\ No newline at end of file +WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/main/pot/index.html b/main/pot/index.html index a1011c9b..eeecf20c 100644 --- a/main/pot/index.html +++ b/main/pot/index.html @@ -1,4 +1,4 @@ -pot - Rust

Crate pot

source ·
Expand description

A concise storage format, written for BonsaiDb.

+pot - Rust

Crate pot

source ·
Expand description

A concise storage format, written for BonsaiDb.

Pot forbids unsafe code crate version Live Build Status @@ -83,5 +83,5 @@

Seri

Deserialize

Deserialize Benchmark Violin Chart

Modules

  • Types for deserializing pots.
  • Low-level interface for reading and writing the pot format.
  • Types for reading data.
  • Types for serializing pots.

Structs

Enums

  • All errors that Pot may return.
  • A Pot-encoded value. This type can be used to deserialize to and from Pot +DeserializeOwned.

Enums

  • All errors that Pot may return.
  • A Pot-encoded value. This type can be used to deserialize to and from Pot without knowing the original data structure.
  • An error from deserializing a type using Value::deserialize_as.

Functions

  • Restores a previously Pot-serialized value from a Read implementer.
  • Restores a previously Pot-serialized value from a slice.
  • Serialize value using Pot into a Vec<u8>.
  • Serialize value using Pot into writer.

Type Definitions

\ No newline at end of file diff --git a/main/pot/reader/struct.SliceReader.html b/main/pot/reader/struct.SliceReader.html index f716f8e8..37b0b377 100644 --- a/main/pot/reader/struct.SliceReader.html +++ b/main/pot/reader/struct.SliceReader.html @@ -1,7 +1,7 @@ SliceReader in pot::reader - Rust

Struct pot::reader::SliceReader

source ·
pub struct SliceReader<'a> { /* private fields */ }
Expand description

Reads data from a slice.

Implementations§

source§

impl<'a> SliceReader<'a>

source

pub const fn len(&self) -> usize

Returns the remaining bytes to read.

source

pub const fn is_empty(&self) -> bool

Returns true if there are no bytes remaining to read.

-

Trait Implementations§

source§

impl<'a> Debug for SliceReader<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a [u8]> for SliceReader<'a>

source§

fn from(data: &'a [u8]) -> Self

Converts to this type from the input type.
source§

impl<'a> From<SliceReader<'a>> for &'a [u8]

source§

fn from(reader: SliceReader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> Read for SliceReader<'a>

source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize>

Pull some bytes from this source into the specified buffer, returning +

Trait Implementations§

source§

impl<'a> Debug for SliceReader<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a [u8]> for SliceReader<'a>

source§

fn from(data: &'a [u8]) -> Self

Converts to this type from the input type.
source§

impl<'a> From<SliceReader<'a>> for &'a [u8]

source§

fn from(reader: SliceReader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> Read for SliceReader<'a>

source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize>

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>

Read the exact number of bytes required to fill buf. Read more
1.36.0 · source§

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored implementation. Read more
1.0.0 · source§

fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>

Read all bytes until EOF in this source, placing them into buf. Read more
1.0.0 · source§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Read all bytes until EOF in this source, appending them to buf. Read more
source§

fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
source§

fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Read the exact number of bytes required to fill cursor. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Selfwhere Self: Sized,

Creates a “by reference” adaptor for this instance of Read. Read more
1.0.0 · source§

fn bytes(self) -> Bytes<Self>where diff --git a/main/pot/ser/struct.MapSerializer.html b/main/pot/ser/struct.MapSerializer.html index c5d679f7..f47502e1 100644 --- a/main/pot/ser/struct.MapSerializer.html +++ b/main/pot/ser/struct.MapSerializer.html @@ -1,15 +1,15 @@ MapSerializer in pot::ser - Rust

Struct pot::ser::MapSerializer

source ·
pub struct MapSerializer<'de, 'a, W: WriteBytesExt> { /* private fields */ }
Expand description

Serializes map-like values.

-

Trait Implementations§

source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeMap for MapSerializer<'de, 'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_key<T>(&mut self, key: &T) -> Result<()>where - T: ?Sized + Serialize,

Serialize a map key. Read more
source§

fn serialize_value<T>(&mut self, value: &T) -> Result<()>where - T: ?Sized + Serialize,

Serialize a map value. Read more
source§

fn end(self) -> Result<()>

Finish serializing a map.
source§

fn serialize_entry<K, V>( +

Trait Implementations§

source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeMap for MapSerializer<'de, 'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_key<T>(&mut self, key: &T) -> Result<()>where + T: ?Sized + Serialize,

Serialize a map key. Read more
source§

fn serialize_value<T>(&mut self, value: &T) -> Result<()>where + T: ?Sized + Serialize,

Serialize a map value. Read more
source§

fn end(self) -> Result<()>

Finish serializing a map.
source§

fn serialize_entry<K, V>( &mut self, key: &K, value: &V -) -> Result<(), Self::Error>where - K: Serialize + ?Sized, - V: Serialize + ?Sized,

Serialize a map entry consisting of a key and a value. Read more
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeStruct for MapSerializer<'de, 'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>where - T: ?Sized + Serialize,

Serialize a struct field.
source§

fn end(self) -> Result<()>

Finish serializing a struct.
source§

fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

Indicate that a struct field has been skipped.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeStructVariant for MapSerializer<'de, 'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>where - T: ?Sized + Serialize,

Serialize a struct variant field.
source§

fn end(self) -> Result<()>

Finish serializing a struct variant.
source§

fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

Indicate that a struct variant field has been skipped.

Auto Trait Implementations§

§

impl<'de, 'a, W> RefUnwindSafe for MapSerializer<'de, 'a, W>where +) -> Result<(), Self::Error>where + K: Serialize + ?Sized, + V: Serialize + ?Sized,

Serialize a map entry consisting of a key and a value. Read more
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeStruct for MapSerializer<'de, 'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>where + T: ?Sized + Serialize,

Serialize a struct field.
source§

fn end(self) -> Result<()>

Finish serializing a struct.
source§

fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

Indicate that a struct field has been skipped.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeStructVariant for MapSerializer<'de, 'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>where + T: ?Sized + Serialize,

Serialize a struct variant field.
source§

fn end(self) -> Result<()>

Finish serializing a struct variant.
source§

fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

Indicate that a struct variant field has been skipped.

Auto Trait Implementations§

§

impl<'de, 'a, W> RefUnwindSafe for MapSerializer<'de, 'a, W>where W: RefUnwindSafe,

§

impl<'de, 'a, W> Send for MapSerializer<'de, 'a, W>where W: Send,

§

impl<'de, 'a, W> Sync for MapSerializer<'de, 'a, W>where W: Sync,

§

impl<'de, 'a, W> Unpin for MapSerializer<'de, 'a, W>

§

impl<'de, 'a, W> !UnwindSafe for MapSerializer<'de, 'a, W>

Blanket Implementations§

source§

impl<T> Any for Twhere diff --git a/main/pot/ser/struct.Serializer.html b/main/pot/ser/struct.Serializer.html index 48e029db..79f11805 100644 --- a/main/pot/ser/struct.Serializer.html +++ b/main/pot/ser/struct.Serializer.html @@ -1,79 +1,79 @@ Serializer in pot::ser - Rust

Struct pot::ser::Serializer

source ·
pub struct Serializer<'a, W: WriteBytesExt> { /* private fields */ }
Expand description

A Pot serializer.

Implementations§

source§

impl<'a, W: WriteBytesExt> Serializer<'a, W>

source

pub fn new(output: W) -> Result<Self>

Returns a new serializer outputting written bytes into output.

-

Trait Implementations§

source§

impl<'a, W: WriteBytesExt> Debug for Serializer<'a, W>

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeSeq for &'de mut Serializer<'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_element<T>(&mut self, value: &T) -> Result<()>where - T: ?Sized + Serialize,

Serialize a sequence element.
source§

fn end(self) -> Result<()>

Finish serializing a sequence.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTuple for &'de mut Serializer<'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_element<T>(&mut self, value: &T) -> Result<()>where - T: ?Sized + Serialize,

Serialize a tuple element.
source§

fn end(self) -> Result<()>

Finish serializing a tuple.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTupleStruct for &'de mut Serializer<'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_field<T>(&mut self, value: &T) -> Result<()>where - T: ?Sized + Serialize,

Serialize a tuple struct field.
source§

fn end(self) -> Result<()>

Finish serializing a tuple struct.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTupleVariant for &'de mut Serializer<'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_field<T>(&mut self, value: &T) -> Result<()>where - T: ?Sized + Serialize,

Serialize a tuple variant field.
source§

fn end(self) -> Result<()>

Finish serializing a tuple variant.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> Serializer for &'de mut Serializer<'a, W>

§

type Error = Error

The error type when some error occurs during serialization.
§

type Ok = ()

The output type produced by this Serializer during successful +

Trait Implementations§

source§

impl<'a, W: WriteBytesExt> Debug for Serializer<'a, W>

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeSeq for &'de mut Serializer<'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_element<T>(&mut self, value: &T) -> Result<()>where + T: ?Sized + Serialize,

Serialize a sequence element.
source§

fn end(self) -> Result<()>

Finish serializing a sequence.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTuple for &'de mut Serializer<'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_element<T>(&mut self, value: &T) -> Result<()>where + T: ?Sized + Serialize,

Serialize a tuple element.
source§

fn end(self) -> Result<()>

Finish serializing a tuple.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTupleStruct for &'de mut Serializer<'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_field<T>(&mut self, value: &T) -> Result<()>where + T: ?Sized + Serialize,

Serialize a tuple struct field.
source§

fn end(self) -> Result<()>

Finish serializing a tuple struct.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> SerializeTupleVariant for &'de mut Serializer<'a, W>

§

type Error = Error

Must match the Error type of our Serializer.
§

type Ok = ()

Must match the Ok type of our Serializer.
source§

fn serialize_field<T>(&mut self, value: &T) -> Result<()>where + T: ?Sized + Serialize,

Serialize a tuple variant field.
source§

fn end(self) -> Result<()>

Finish serializing a tuple variant.
source§

impl<'de, 'a: 'de, W: WriteBytesExt + 'a> Serializer for &'de mut Serializer<'a, W>

§

type Error = Error

The error type when some error occurs during serialization.
§

type Ok = ()

The output type produced by this Serializer during successful serialization. Most serializers that produce text or binary output should set Ok = () and serialize into an io::Write or buffer contained within the Serializer instance. Serializers that build in-memory data structures may be simplified by using Ok to propagate -the data structure around.
§

type SerializeMap = MapSerializer<'de, 'a, W>

Type returned from serialize_map for serializing the content of the -map.
§

type SerializeSeq = &'de mut Serializer<'a, W>

Type returned from serialize_seq for serializing the content of the -sequence.
§

type SerializeStruct = MapSerializer<'de, 'a, W>

Type returned from serialize_struct for serializing the content of -the struct.
§

type SerializeStructVariant = MapSerializer<'de, 'a, W>

Type returned from serialize_struct_variant for serializing the -content of the struct variant.
§

type SerializeTuple = &'de mut Serializer<'a, W>

Type returned from serialize_tuple for serializing the content of -the tuple.
§

type SerializeTupleStruct = &'de mut Serializer<'a, W>

Type returned from serialize_tuple_struct for serializing the -content of the tuple struct.
§

type SerializeTupleVariant = &'de mut Serializer<'a, W>

Type returned from serialize_tuple_variant for serializing the -content of the tuple variant.
source§

fn is_human_readable(&self) -> bool

Determine whether Serialize implementations should serialize in -human-readable form. Read more
source§

fn serialize_bool(self, v: bool) -> Result<()>

Serialize a bool value. Read more
source§

fn serialize_i8(self, v: i8) -> Result<()>

Serialize an i8 value. Read more
source§

fn serialize_i16(self, v: i16) -> Result<()>

Serialize an i16 value. Read more
source§

fn serialize_i32(self, v: i32) -> Result<()>

Serialize an i32 value. Read more
source§

fn serialize_i64(self, v: i64) -> Result<()>

Serialize an i64 value. Read more
source§

fn serialize_i128(self, v: i128) -> Result<()>

Serialize an i128 value. Read more
source§

fn serialize_u8(self, v: u8) -> Result<()>

Serialize a u8 value. Read more
source§

fn serialize_u16(self, v: u16) -> Result<()>

Serialize a u16 value. Read more
source§

fn serialize_u32(self, v: u32) -> Result<()>

Serialize a u32 value. Read more
source§

fn serialize_u64(self, v: u64) -> Result<()>

Serialize a u64 value. Read more
source§

fn serialize_u128(self, v: u128) -> Result<()>

Serialize a u128 value. Read more
source§

fn serialize_f32(self, v: f32) -> Result<()>

Serialize an f32 value. Read more
source§

fn serialize_f64(self, v: f64) -> Result<()>

Serialize an f64 value. Read more
source§

fn serialize_char(self, v: char) -> Result<()>

Serialize a character. Read more
source§

fn serialize_str(self, v: &str) -> Result<()>

Serialize a &str. Read more
source§

fn serialize_bytes(self, v: &[u8]) -> Result<()>

Serialize a chunk of raw byte data. Read more
source§

fn serialize_none(self) -> Result<()>

Serialize a None value. Read more
source§

fn serialize_some<T>(self, value: &T) -> Result<()>where - T: ?Sized + Serialize,

Serialize a Some(T) value. Read more
source§

fn serialize_unit(self) -> Result<()>

Serialize a () value. Read more
source§

fn serialize_unit_struct(self, _name: &'static str) -> Result<()>

Serialize a unit struct like struct Unit or PhantomData<T>. Read more
source§

fn serialize_unit_variant( +the data structure around.

§

type SerializeMap = MapSerializer<'de, 'a, W>

Type returned from serialize_map for serializing the content of the +map.
§

type SerializeSeq = &'de mut Serializer<'a, W>

Type returned from serialize_seq for serializing the content of the +sequence.
§

type SerializeStruct = MapSerializer<'de, 'a, W>

Type returned from serialize_struct for serializing the content of +the struct.
§

type SerializeStructVariant = MapSerializer<'de, 'a, W>

Type returned from serialize_struct_variant for serializing the +content of the struct variant.
§

type SerializeTuple = &'de mut Serializer<'a, W>

Type returned from serialize_tuple for serializing the content of +the tuple.
§

type SerializeTupleStruct = &'de mut Serializer<'a, W>

Type returned from serialize_tuple_struct for serializing the +content of the tuple struct.
§

type SerializeTupleVariant = &'de mut Serializer<'a, W>

Type returned from serialize_tuple_variant for serializing the +content of the tuple variant.
source§

fn is_human_readable(&self) -> bool

Determine whether Serialize implementations should serialize in +human-readable form. Read more
source§

fn serialize_bool(self, v: bool) -> Result<()>

Serialize a bool value. Read more
source§

fn serialize_i8(self, v: i8) -> Result<()>

Serialize an i8 value. Read more
source§

fn serialize_i16(self, v: i16) -> Result<()>

Serialize an i16 value. Read more
source§

fn serialize_i32(self, v: i32) -> Result<()>

Serialize an i32 value. Read more
source§

fn serialize_i64(self, v: i64) -> Result<()>

Serialize an i64 value. Read more
source§

fn serialize_i128(self, v: i128) -> Result<()>

Serialize an i128 value. Read more
source§

fn serialize_u8(self, v: u8) -> Result<()>

Serialize a u8 value. Read more
source§

fn serialize_u16(self, v: u16) -> Result<()>

Serialize a u16 value. Read more
source§

fn serialize_u32(self, v: u32) -> Result<()>

Serialize a u32 value. Read more
source§

fn serialize_u64(self, v: u64) -> Result<()>

Serialize a u64 value. Read more
source§

fn serialize_u128(self, v: u128) -> Result<()>

Serialize a u128 value. Read more
source§

fn serialize_f32(self, v: f32) -> Result<()>

Serialize an f32 value. Read more
source§

fn serialize_f64(self, v: f64) -> Result<()>

Serialize an f64 value. Read more
source§

fn serialize_char(self, v: char) -> Result<()>

Serialize a character. Read more
source§

fn serialize_str(self, v: &str) -> Result<()>

Serialize a &str. Read more
source§

fn serialize_bytes(self, v: &[u8]) -> Result<()>

Serialize a chunk of raw byte data. Read more
source§

fn serialize_none(self) -> Result<()>

Serialize a None value. Read more
source§

fn serialize_some<T>(self, value: &T) -> Result<()>where + T: ?Sized + Serialize,

Serialize a Some(T) value. Read more
source§

fn serialize_unit(self) -> Result<()>

Serialize a () value. Read more
source§

fn serialize_unit_struct(self, _name: &'static str) -> Result<()>

Serialize a unit struct like struct Unit or PhantomData<T>. Read more
source§

fn serialize_unit_variant( self, _name: &'static str, _variant_index: u32, variant: &'static str -) -> Result<()>

Serialize a unit variant like E::A in enum E { A, B }. Read more
source§

fn serialize_newtype_struct<T>( +) -> Result<()>

Serialize a unit variant like E::A in enum E { A, B }. Read more
source§

fn serialize_newtype_struct<T>( self, _name: &'static str, value: &T ) -> Result<()>where - T: ?Sized + Serialize,

Serialize a newtype struct like struct Millimeters(u8). Read more
source§

fn serialize_newtype_variant<T>( + T: ?Sized + Serialize,

Serialize a newtype struct like struct Millimeters(u8). Read more
source§

fn serialize_newtype_variant<T>( self, _name: &'static str, _variant_index: u32, variant: &'static str, value: &T ) -> Result<()>where - T: ?Sized + Serialize,

Serialize a newtype variant like E::N in enum E { N(u8) }. Read more
source§

fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq>

Begin to serialize a variably sized sequence. This call must be + T: ?Sized + Serialize,

Serialize a newtype variant like E::N in enum E { N(u8) }. Read more
source§

fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq>

Begin to serialize a variably sized sequence. This call must be followed by zero or more calls to serialize_element, then a call to -end. Read more
source§

fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple>

Begin to serialize a statically sized sequence whose length will be +end. Read more
source§

fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple>

Begin to serialize a statically sized sequence whose length will be known at deserialization time without looking at the serialized data. This call must be followed by zero or more calls to serialize_element, -then a call to end. Read more
source§

fn serialize_tuple_struct( +then a call to end. Read more

source§

fn serialize_tuple_struct( self, _name: &'static str, len: usize -) -> Result<Self::SerializeTupleStruct>

Begin to serialize a tuple struct like struct Rgb(u8, u8, u8). This +) -> Result<Self::SerializeTupleStruct>
Begin to serialize a tuple struct like struct Rgb(u8, u8, u8). This call must be followed by zero or more calls to serialize_field, then a -call to end. Read more
source§

fn serialize_tuple_variant( +call to end. Read more

source§

fn serialize_tuple_variant( self, _name: &'static str, _variant_index: u32, variant: &'static str, len: usize -) -> Result<Self::SerializeTupleVariant>

Begin to serialize a tuple variant like E::T in enum E { T(u8, u8) }. This call must be followed by zero or more calls to -serialize_field, then a call to end. Read more
source§

fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap>

Begin to serialize a map. This call must be followed by zero or more -calls to serialize_key and serialize_value, then a call to end. Read more
source§

fn serialize_struct( +) -> Result<Self::SerializeTupleVariant>

Begin to serialize a tuple variant like E::T in enum E { T(u8, u8) }. This call must be followed by zero or more calls to +serialize_field, then a call to end. Read more
source§

fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap>

Begin to serialize a map. This call must be followed by zero or more +calls to serialize_key and serialize_value, then a call to end. Read more
source§

fn serialize_struct( self, _name: &'static str, len: usize -) -> Result<Self::SerializeStruct>

Begin to serialize a struct like struct Rgb { r: u8, g: u8, b: u8 }. +) -> Result<Self::SerializeStruct>
Begin to serialize a struct like struct Rgb { r: u8, g: u8, b: u8 }. This call must be followed by zero or more calls to serialize_field, -then a call to end. Read more
source§

fn serialize_struct_variant( +then a call to end. Read more

source§

fn serialize_struct_variant( self, name: &'static str, _variant_index: u32, variant: &'static str, len: usize -) -> Result<Self::SerializeStructVariant>

Begin to serialize a struct variant like E::S in enum E { S { r: u8, g: u8, b: u8 } }. This call must be followed by zero or more calls to -serialize_field, then a call to end. Read more
source§

fn collect_seq<I>(self, iter: I) -> Result<Self::Ok, Self::Error>where +) -> Result<Self::SerializeStructVariant>

Begin to serialize a struct variant like E::S in enum E { S { r: u8, g: u8, b: u8 } }. This call must be followed by zero or more calls to +serialize_field, then a call to end. Read more
source§

fn collect_seq<I>(self, iter: I) -> Result<Self::Ok, Self::Error>where I: IntoIterator, - <I as IntoIterator>::Item: Serialize,

Collect an iterator as a sequence. Read more
source§

fn collect_map<K, V, I>(self, iter: I) -> Result<Self::Ok, Self::Error>where - K: Serialize, - V: Serialize, - I: IntoIterator<Item = (K, V)>,

Collect an iterator as a map. Read more
source§

fn collect_str<T>(self, value: &T) -> Result<Self::Ok, Self::Error>where - T: Display + ?Sized,

Serialize a string produced by an implementation of Display. Read more

Auto Trait Implementations§

§

impl<'a, W> RefUnwindSafe for Serializer<'a, W>where + <I as IntoIterator>::Item: Serialize,

Collect an iterator as a sequence. Read more
source§

fn collect_map<K, V, I>(self, iter: I) -> Result<Self::Ok, Self::Error>where + K: Serialize, + V: Serialize, + I: IntoIterator<Item = (K, V)>,

Collect an iterator as a map. Read more
source§

fn collect_str<T>(self, value: &T) -> Result<Self::Ok, Self::Error>where + T: Display + ?Sized,

Serialize a string produced by an implementation of Display. Read more

Auto Trait Implementations§

§

impl<'a, W> RefUnwindSafe for Serializer<'a, W>where W: RefUnwindSafe,

§

impl<'a, W> Send for Serializer<'a, W>where W: Send,

§

impl<'a, W> Sync for Serializer<'a, W>where W: Sync,

§

impl<'a, W> Unpin for Serializer<'a, W>where diff --git a/main/pot/struct.Config.html b/main/pot/struct.Config.html index b1318639..d8a21a52 100644 --- a/main/pot/struct.Config.html +++ b/main/pot/struct.Config.html @@ -6,13 +6,13 @@ can be aware of.

The default allocation budget is usize::MAX.

source

pub fn deserialize<'de, T>(&self, serialized: &'de [u8]) -> Result<T>where - T: Deserialize<'de>,

Deserializes a value from a slice using the configured options.

+ T: Deserialize<'de>,

Deserializes a value from a slice using the configured options.

source

pub fn deserialize_from<T, R: Read>(&self, reader: R) -> Result<T>where - T: DeserializeOwned,

Deserializes a value from a Read implementer using the configured + T: DeserializeOwned,

Deserializes a value from a Read implementer using the configured options.

-
source

pub fn serialize<T: Serialize>(&self, value: &T) -> Result<Vec<u8>>

Serializes a value to a Vec using the configured options.

+
source

pub fn serialize<T: Serialize>(&self, value: &T) -> Result<Vec<u8>>

Serializes a value to a Vec using the configured options.

source

pub fn serialize_into<T, W>(&self, value: &T, writer: W) -> Result<()>where - T: Serialize, + T: Serialize, W: WriteBytesExt,

Serializes a value to a writer using the configured options.

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Config

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere diff --git a/main/pot/struct.OwnedValue.html b/main/pot/struct.OwnedValue.html index 4c088f2c..0e64df24 100644 --- a/main/pot/struct.OwnedValue.html +++ b/main/pot/struct.OwnedValue.html @@ -1,11 +1,11 @@ -OwnedValue in pot - Rust

Struct pot::OwnedValue

source ·
pub struct OwnedValue(pub Value<'static>);
Expand description

A Value<'static> wrapper that supports -DeserializeOwned.

+OwnedValue in pot - Rust

Struct pot::OwnedValue

source ·
pub struct OwnedValue(pub Value<'static>);
Expand description

A Value<'static> wrapper that supports +DeserializeOwned.

Because Value<'a> can borrow strings and bytes during deserialization, Value<'static> can’t be used when DeserializeOwned is needed. -OwnedValue implements Deserialize by first deserializing a +OwnedValue implements Deserialize by first deserializing a Value<'a> and then using Value::into_static to convert borrowed data to owned data.

-

Tuple Fields§

§0: Value<'static>

Methods from Deref<Target = Value<'static>>§

source

pub fn deserialize_as<'de, T: Deserialize<'de>>( +

Tuple Fields§

§0: Value<'static>

Methods from Deref<Target = Value<'static>>§

source

pub fn deserialize_as<'de, T: Deserialize<'de>>( &'de self ) -> Result<T, ValueError>

Attempts to create an instance of T from this value.

@@ -22,7 +22,7 @@ let serialized = Value::from_serialize(&original); let deserialized: Vec<Example> = serialized.deserialize_as().unwrap(); assert_eq!(deserialized, original);
-

source

pub fn is_empty(&self) -> bool

Returns true if the value contained is considered empty.

+
source

pub fn is_empty(&self) -> bool

Returns true if the value contained is considered empty.

// Value::None is always empty.
 assert_eq!(Value::None.is_empty(), true);
@@ -49,7 +49,7 @@
     Value::from(vec![(Value::None, Value::None)]).is_empty(),
     false
 );
-
source

pub fn as_bool(&self) -> bool

Returns the value as a bool.

+
source

pub fn as_bool(&self) -> bool

Returns the value as a bool.

// Value::None is always false.
 assert_eq!(Value::None.as_bool(), false);
@@ -83,33 +83,33 @@
     Value::from(vec![(Value::None, Value::None)]).as_bool(),
     true
 );
-
source

pub fn as_integer(&self) -> Option<Integer>

Returns the value as an Integer. Returns None if the value is not a +

source

pub fn as_integer(&self) -> Option<Integer>

Returns the value as an Integer. Returns None if the value is not a Self::Float or Self::Integer. Also returns None if the value is a float, but cannot be losslessly converted to an integer.

-
source

pub fn as_float(&self) -> Option<Float>

Returns the value as an Float. Returns None if the value is not a +

source

pub fn as_float(&self) -> Option<Float>

Returns the value as an Float. Returns None if the value is not a Self::Float or Self::Integer. Also returns None if the value is an integer, but cannot be losslessly converted to a float.

-
source

pub fn as_str(&self) -> Option<&str>

Returns the value as a string, or None if the value is not representable +

source

pub fn as_str(&self) -> Option<&str>

Returns the value as a string, or None if the value is not representable by a string. This will only return a value with variants Self::String and Self::Bytes. Bytes will only be returned if the contained bytes can be safely interpretted as UTF-8.

-
source

pub fn as_bytes(&self) -> Option<&[u8]>

Returns the value as bytes, or None if the value is not stored as a +

source

pub fn as_bytes(&self) -> Option<&[u8]>

Returns the value as bytes, or None if the value is not stored as a representation of bytes. This will only return a value with variants Self::String and Self::Bytes.

-
source

pub fn values(&self) -> SequenceIter<'_>

Returns an iterator that iterates over all values contained inside of +

source

pub fn values(&self) -> SequenceIter<'_>

Returns an iterator that iterates over all values contained inside of this value. Returns an empty iterator if not a Self::Sequence or Self::Mappings. If a Self::Mappings, only the value portion of the mapping is returned.

-
source

pub fn mappings(&self) -> Iter<'_, (Self, Self)>

Returns an iterator that iterates over all mappings contained inside of +

source

pub fn mappings(&self) -> Iter<'_, (Self, Self)>

Returns an iterator that iterates over all mappings contained inside of this value. Returns an empty iterator if not a Self::Sequence or Self::Mappings. If a Self::Sequence, the key will always be Self::None.

-
source

pub fn to_static(&self) -> Value<'static>

Converts self to a 'static lifetime by cloning all data.

-

Trait Implementations§

source§

impl Clone for OwnedValue

source§

fn clone(&self) -> OwnedValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OwnedValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for OwnedValue

§

type Target = Value<'static>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for OwnedValue

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for OwnedValue

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where - D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<OwnedValue> for OwnedValue

source§

fn eq(&self, other: &OwnedValue) -> bool

This method tests for self and other values to be equal, and is used +
source

pub fn to_static(&self) -> Value<'static>

Converts self to a 'static lifetime by cloning all data.

+

Trait Implementations§

source§

impl Clone for OwnedValue

source§

fn clone(&self) -> OwnedValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OwnedValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for OwnedValue

§

type Target = Value<'static>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for OwnedValue

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for OwnedValue

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<OwnedValue> for OwnedValue

source§

fn eq(&self, other: &OwnedValue) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Serialize for OwnedValue

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for OwnedValue

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl Serialize for OwnedValue

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for OwnedValue

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

@@ -125,5 +125,5 @@ U: TryFrom<T>,
§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere - T: for<'de> Deserialize<'de>,

\ No newline at end of file +WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/main/pot/type.Result.html b/main/pot/type.Result.html index f0bda53b..e0cff8d1 100644 --- a/main/pot/type.Result.html +++ b/main/pot/type.Result.html @@ -1,2 +1,2 @@ -Result in pot - Rust

Type Definition pot::Result

source ·
pub type Result<T> = Result<T, Error>;
Expand description

A result alias that returns Error.

+Result in pot - Rust

Type Definition pot::Result

source ·
pub type Result<T, E = Error> = Result<T, E>;
Expand description

A result alias that returns Error.

\ No newline at end of file diff --git a/main/search-index.js b/main/search-index.js index 6fe157dd..b3ee2626 100644 --- a/main/search-index.js +++ b/main/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"pot":{"doc":"A concise storage format, written for BonsaiDb.","t":"NNDNNENNNNNNNNNNNNNDGNNNNNNNNEELLLLLLLLLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLFLLLLLLLLLLAALLLLLLLLLLLLFFLLLLLLLLLLLLLLLLMMNDNNELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDNNNNNNNNDNNNDNENNNNENENNNNNNMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMFFLLFLLLLLLLLLLLLLLLLLLLLLLLLLLFFFFFFFFFFFFFFFFFLLFFFFFFFFDIDLLLLKLLLLLLLLLLLLLLLLLLLLLLLDDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL","n":["Bool","Bytes","Config","Custom","Eof","Error","Expected","Float","ImpreciseCastWouldLoseData","IncompatibleVersion","Integer","InvalidAtomHeader","InvalidKind","InvalidUtf8","Io","Mappings","Message","None","NotAPot","OwnedValue","Result","Sequence","SequenceSizeMustBeKnown","String","TooManyBytesRead","TrailingBytes","UnexpectedKind","Unit","UnknownSymbol","Value","ValueError","allocation_budget","as_bool","as_bytes","as_float","as_integer","as_str","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","custom","custom","custom","de","default","deref","deref_mut","deserialize","deserialize","deserialize","deserialize_as","deserialize_from","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","format","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_mappings","from_reader","from_sequence","from_serialize","from_slice","into","into","into","into","into","into_static","is_empty","mappings","provide","provide","reader","ser","serialize","serialize","serialize","serialize_into","source","to_owned","to_owned","to_owned","to_static","to_string","to_string","to_string","to_vec","to_writer","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","values","kind","value","Borrowed","Deserializer","Owned","Persistent","SymbolMap","borrow","borrow","borrow_mut","borrow_mut","deserialize_any","deserialize_bool","deserialize_byte_buf","deserialize_bytes","deserialize_char","deserialize_enum","deserialize_f32","deserialize_f64","deserialize_i128","deserialize_i16","deserialize_i32","deserialize_i64","deserialize_i8","deserialize_identifier","deserialize_ignored_any","deserialize_map","deserialize_newtype_struct","deserialize_option","deserialize_seq","deserialize_str","deserialize_string","deserialize_struct","deserialize_tuple","deserialize_tuple_struct","deserialize_u128","deserialize_u16","deserialize_u32","deserialize_u64","deserialize_u8","deserialize_unit","deserialize_unit_struct","deserializer_for_slice","end_of_input","fmt","fmt","from","from","into","into","is_human_readable","new","newtype_variant_seed","struct_variant","try_from","try_from","try_into","try_into","tuple_variant","type_id","type_id","unit_variant","variant_seed","Atom","Boolean","Bytes","Bytes","DynamicEnd","DynamicEnd","DynamicMap","DynamicMap","False","Float","Float","Float","Int","Integer","Integer","Kind","Map","Named","Named","None","Nucleus","Sequence","Special","Special","Symbol","True","UInt","Unit","Unit","arg","as_f32","as_f32","as_f64","as_f64","as_float","as_i128","as_i16","as_i32","as_i64","as_i8","as_integer","as_u128","as_u16","as_u32","as_u64","as_u8","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","deserialize","deserialize","eq","eq","eq","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_u8","into","into","into","into","into","into","is_zero","is_zero","kind","nucleus","read_atom","read_atom_header","read_from","read_from","read_header","serialize","serialize","to_owned","to_owned","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","write_atom_header","write_bool","write_bytes","write_f32","write_f64","write_header","write_i128","write_i16","write_i24","write_i32","write_i48","write_i64","write_i8","write_named","write_none","write_special","write_str","write_to","write_to","write_u128","write_u16","write_u24","write_u32","write_u48","write_u64","write_u8","write_unit","IoReader","Reader","SliceReader","borrow","borrow","borrow_mut","borrow_mut","buffered_read_bytes","buffered_read_bytes","buffered_read_bytes","fmt","from","from","from","into","into","is_empty","len","read","read","read_exact","read_exact","read_to_end","read_to_string","read_vectored","try_from","try_from","try_into","try_into","type_id","type_id","MapSerializer","Serializer","SymbolMap","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","default","end","end","end","end","end","end","end","fmt","fmt","from","from","from","into","into","into","is_human_readable","new","serialize_bool","serialize_bytes","serialize_char","serialize_element","serialize_element","serialize_f32","serialize_f64","serialize_field","serialize_field","serialize_field","serialize_field","serialize_i128","serialize_i16","serialize_i32","serialize_i64","serialize_i8","serialize_key","serialize_map","serialize_newtype_struct","serialize_newtype_variant","serialize_none","serialize_seq","serialize_some","serialize_str","serialize_struct","serialize_struct_variant","serialize_tuple","serialize_tuple_struct","serialize_tuple_variant","serialize_u128","serialize_u16","serialize_u32","serialize_u64","serialize_u8","serialize_unit","serialize_unit_struct","serialize_unit_variant","serialize_value","serializer_for","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id"],"q":[[0,"pot"],[153,"pot::ValueError"],[155,"pot::de"],[216,"pot::format"],[381,"pot::reader"],[412,"pot::ser"]],"d":["A boolean value","A value containing arbitrary bytes.","Serialization and deserialization configuration.","A custom deserialization error. These errors originate …","Expected more data but encountered the end of the input.","All errors that Pot may return.","A kind of data was expected, but the Value cannot be …","A floating point value.","A numerical value could not be handled without losing …","Data was written with an incompatible version.","An integer value.","An atom header was incorrectly formatted.","An unknown kind was encountered. Generally a sign that …","String data contained invalid UTF-8 characters.","An IO error occurred.","A sequence of key-value mappings.","A generic error occurred.","A value representing None.","Payload is not a Pot payload.","A Value<'static> wrapper that supports DeserializeOwned.","A result alias that returns Error.","A sequence of values.","A sequence of unknown size cannot be serialized.","A string value.","The amount of data read exceeds the configured maximum …","Extra data appeared at the end of the input.","Encountered an unexpected atom kind.","A value representing unit (()).","A requested symbol id was not found.","A Pot-encoded value. This type can be used to deserialize …","An error from deserializing a type using …","Sets the maximum number of bytes able to be allocated. …","Returns the value as a bool.","Returns the value as bytes, or None if the value is not …","Returns the value as an Float. Returns None if the value …","Returns the value as an Integer. Returns None if the value …","Returns the value as a string, or None if the value is not …","","","","","","","","","","","","","","","","","","","","Types for deserializing pots.","","","","","","Deserializes a value from a slice using the configured …","Attempts to create an instance of T from this value.","Deserializes a value from a Read implementer using the …","","","","","","","","","","","Low-level interface for reading and writing the pot format.","Returns the argument unchanged.","","","","","","","","","","","","","","Returns the argument unchanged.","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns a new value from an iterator of 2-element tuples …","Restores a previously Pot-serialized value from a Read …","Returns a new value from an iterator of items that can be …","Creates a Value from the given Serde-compatible type.","Restores a previously Pot-serialized value from a slice.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Converts self to a 'static lifetime by cloning any …","Returns true if the value contained is considered empty.","Returns an iterator that iterates over all mappings …","","","Types for reading data.","Types for serializing pots.","","","Serializes a value to a Vec using the configured options.","Serializes a value to a writer using the configured …","","","","","Converts self to a 'static lifetime by cloning all data.","","","","Serialize value using Pot into a Vec<u8>.","Serialize value using Pot into writer.","","","","","","","","","","","","","","","","Returns an iterator that iterates over all values …","The kind of data expected.","The value that was encountered.","A list of borrowed symbols.","Deserializer for the Pot format.","An owned list of symbols.","A mutable reference to an owned list of symbols.","A collection of deserialized symbols.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns a deserializer for slice.","Returns true if the input has been consumed completely.","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","","Returns a new symbol map that will persist symbols between …","","","","","","","","","","","","An encoded Kind, argument, and optional contained value.","A boolean value.","A series of bytes. The argument is the length. The bytes …","A buffer of bytes.","A terminal value for a Self::DynamicMap.","A marker denoting the end of a map with unknown length.","A sequence of key-value pairs with an unknown length.","A marker denoting a map with unknown length is next in the …","The false boolean literal.","A floating point number that can safely convert between …","A floating point value. Argument is the byte length, minus …","A floating point value.","A signed integer. Argument is the byte length, minus one. …","An integer type that can safely convert between other …","An integer value.","The type of an atom.","A list of key-value pairs. Argument is the count of …","A named value. A symbol followed by another value.","A named value.","A None value.","A value contained within an Atom.","A list of atoms. Argument is the count of atoms in the …","A special value type.","A value with a special meaning.","A symbol. If the least-significant bit of the arg is 0, …","The true boolean literal.","An unsigned integer. Argument is the byte length, minus …","A Unit value.","A unit.","The argument contained in the atom header.","Converts this integer to an f32, but only if it can be …","Returns this number as an f32, if it can be done without …","Converts this integer to an f64, but only if it can be …","Returns this number as an f64.","Converts this integer to an f64, but only if it can be …","Returns the contained value as an i64, or an error if the …","Returns the contained value as an i16, or an error if the …","Returns the contained value as an i32, or an error if the …","Returns the contained value as an i64, or an error if the …","Returns the contained value as an i8, or an error if the …","Returns this number as an Integer, if the stored value has …","Returns the contained value as an u64, or an error if the …","Returns the contained value as an u16, or an error if the …","Returns the contained value as an u32, or an error if the …","Returns the contained value as an u64, or an error if the …","Returns the contained value as an u8, or an error if the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","Converts from a u8. Returns an error if kind is an invalid …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if the value contained is zero.","Returns true if the value contained is zero.","The type of atom.","The contained value, if any.","Reads an atom.","Reads an atom header (kind and argument).","Reads an integer based on the atom header (kind and …","Reads a floating point number given the atom kind and …","Reads a Pot header. See write_header for more information. …","","","","","","","","","","","","","","","","","","","","","","","","","","","Writes an atom header into writer.","Writes a Kind::Special atom with either Special::True or …","Writes an Kind::Bytes atom with the given value.","Writes an Kind::Float atom with the given value.","Writes an Kind::Float atom with the given value.","Writes the Pot header. A u32 written in big endian. The …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes a Kind::Special atom with Special::Named.","Writes a Kind::Special atom with Special::None.","Writes a Kind::Special atom.","Writes an Kind::Bytes atom with the bytes of the string.","Writes this value using the smallest form possible.","Writes this value using the smallest form possible.","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::UInt atom with the given value.","Writes a Kind::Special atom with Special::Unit.","A reader over ReadBytesExt.","A reader that can temporarily buffer bytes read.","Reads data from a slice.","","","","","Reads exactly length bytes and returns a reference to the …","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Returns true if there are no bytes remaining to read.","Returns the remaining bytes to read.","","","","","","","","","","","","","","Serializes map-like values.","A Pot serializer.","A list of previously serialized symbols.","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Returns a new serializer outputting written bytes into …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns a serializer that writes into output and persists …","","","","","","","","",""],"i":[3,3,0,14,13,0,14,3,13,13,3,13,13,13,13,3,13,3,13,0,0,3,13,3,13,13,13,3,13,0,0,1,3,3,3,3,3,13,3,11,14,1,13,3,11,14,1,3,11,1,3,11,1,13,13,14,0,1,11,11,3,11,1,3,1,3,11,13,13,3,3,11,14,14,1,0,13,13,13,13,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,11,14,1,3,0,3,3,0,13,3,11,14,1,3,3,3,13,14,0,0,3,11,1,1,13,3,11,1,3,13,3,14,0,0,13,3,11,14,1,13,3,11,14,1,13,3,11,14,1,3,68,68,51,0,51,51,0,49,51,49,51,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,51,49,49,51,49,51,49,51,49,51,49,49,49,51,49,51,49,49,51,49,49,0,56,54,56,58,56,58,56,58,0,54,56,54,0,56,0,54,58,56,58,0,54,0,54,54,58,54,58,56,55,9,8,9,8,9,9,9,9,9,9,8,9,9,9,9,9,58,54,9,55,8,56,58,54,9,55,8,56,54,9,8,54,9,8,9,8,54,9,8,54,9,54,9,9,55,8,8,56,58,54,9,9,9,9,9,9,9,9,9,9,9,55,8,8,8,56,54,58,54,9,55,8,56,9,8,55,55,0,0,9,8,0,9,8,54,9,8,9,8,58,58,54,9,55,8,56,58,54,9,55,8,56,58,54,9,55,8,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,8,0,0,0,0,0,0,0,0,0,0,0,52,61,52,61,48,52,61,52,52,52,61,52,61,52,52,52,61,52,61,61,61,61,52,61,52,61,52,61,0,0,0,64,65,63,64,65,63,63,64,64,64,65,65,65,65,65,63,64,65,63,64,65,63,65,65,65,65,65,65,65,65,65,64,64,65,65,65,65,65,65,65,64,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,64,63,64,65,63,64,65,63,64,65,63],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[1,2],1],[3,4],[3,[[7,[[6,[5]]]]]],[3,[[7,[8]]]],[3,[[7,[9]]]],[3,[[7,[10]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[3,3],[11,11],[1,1],[[]],[[]],[[]],[12,13],[12,13],[12,14],0,[[],1],[11],[11],[15,[[16,[3]]]],[15,[[16,[11]]]],[[1,[6,[5]]],[[18,[17]]]],[3,[[16,[17,14]]]],[[1,19],[[18,[20]]]],[[3,3],4],[[11,11],4],[[13,21],22],[[13,21],22],[[3,21],22],[[3,21],22],[[11,21],22],[[14,21],22],[[14,21],22],[[1,21],22],0,[[]],[23,13],[24,13],[25,13],[26,3],[27,3],[28,3],[29,3],[30,3],[[[6,[5]]],3],[31,3],[[[32,[5]]],3],[5,3],[33,3],[[]],[10,3],[34,3],[[[35,[5]]],3],[36,3],[4,3],[37,3],[[[7,[3]]],3],[38,3],[39,3],[35,3],[[[35,[3]]],3],[[],3],[[]],[[]],[[]],[40,3],[19,[[18,[20]]]],[40,3],[41,3],[[[6,[5]]],[[18,[17]]]],[[]],[[]],[[]],[[]],[[]],[3,3],[3,4],[3,42],[43],[43],0,0,[[3,44],16],[[11,44],16],[[1,41],[[18,[[35,[5]]]]]],[[1,41,45],18],[13,[[7,[46]]]],[[]],[[]],[[]],[3,3],[[],34],[[],34],[[],34],[41,[[18,[[35,[5]]]]]],[[41,45],18],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],47],[[],47],[[],47],[[],47],[[],47],0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],10,[6,[10]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],10,50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],10,[6,[10]],50],18],[[[49,[48]],2,50],18],[[[49,[48]],10,2,50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],10,50],18],[[51,[6,[5]]],[[18,[[49,[52]]]]]],[[[49,[52]]],4],[[[49,[48]],21],22],[[51,21],22],[[]],[[]],[[]],[[]],[[[49,[48]]],4],[[],51],[[[49,[48]],53],18],[[[49,[48]],[6,[10]],50],18],[[],16],[[],16],[[],16],[[],16],[[[49,[48]],2,50],18],[[],47],[[],47],[[[49,[48]]],18],[[[49,[48]],53],18],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[9,[[16,[39,13]]]],[8,[[16,[39,13]]]],[9,[[16,[30,13]]]],[8,30],[9,[[16,[8,13]]]],[9,[[16,[36,13]]]],[9,[[16,[37,13]]]],[9,[[16,[28,13]]]],[9,[[16,[31,13]]]],[9,[[16,[33,13]]]],[8,[[16,[9,13]]]],[9,[[16,[26,13]]]],[9,[[16,[27,13]]]],[9,[[16,[38,13]]]],[9,[[16,[29,13]]]],[9,[[16,[5,13]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[54,54],[9,9],[8,8],[[]],[[]],[[]],[15,[[16,[9]]]],[15,[[16,[8]]]],[[54,54],4],[[9,9],4],[[8,8],4],[[],4],[[],4],[[54,21],22],[[9,21],22],[[9,21],22],[[55,21],22],[[8,21],22],[[8,21],22],[[56,21],22],[[]],[[]],[5,9],[36,9],[31,9],[28,9],[33,9],[29,9],[38,9],[26,9],[37,9],[[]],[27,9],[[]],[30,8],[[]],[39,8],[[]],[5,[[16,[54,13]]]],[[]],[[]],[[]],[[]],[[]],[[]],[9,4],[8,4],0,0,[[48,2],[[16,[55,13]]]],[57,[[16,[13]]]],[[54,2,57],[[16,[9,13]]]],[[54,2,57],[[16,[8,13]]]],[57,[[16,[5,13]]]],[[9,44],16],[[8,44],16],[[]],[[]],[[]],[[],34],[[],34],[29,[[16,[58]]]],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],47],[[],47],[[],47],[[],47],[[],47],[[],47],[[45,54,[7,[29]]],[[59,[2]]]],[[45,4],[[59,[2]]]],[[45,[6,[5]]],[[59,[2]]]],[[45,39],[[59,[2]]]],[[45,30],[[59,[2]]]],[[45,5],[[59,[2]]]],[[45,36],[[59,[2]]]],[[45,37],[[59,[2]]]],[[45,28],[[59,[2]]]],[[45,28],[[59,[2]]]],[[45,31],[[59,[2]]]],[[45,31],[[59,[2]]]],[[45,33],[[59,[2]]]],[45,[[59,[2]]]],[45,[[59,[2]]]],[[45,58],[[59,[2]]]],[[45,10],[[59,[2]]]],[[9,45],[[59,[2]]]],[[8,45],[[59,[2]]]],[[45,26],[[59,[2]]]],[[45,27],[[59,[2]]]],[[45,38],[[59,[2]]]],[[45,38],[[59,[2]]]],[[45,29],[[59,[2]]]],[[45,29],[[59,[2]]]],[[45,5],[[59,[2]]]],[45,[[59,[2]]]],0,0,0,[[]],[[]],[[]],[[]],[2,[[16,[[60,[[6,[5]]]],13]]]],[[52,2],[[16,[[60,[[6,[5]]]],13]]]],[[[61,[57]],2],[[16,[[60,[[6,[5]]]],13]]]],[[52,21],22],[[[6,[5]]],52],[[]],[[]],[[]],[[]],[52,4],[52,2],[[52,[6,[5]]],[[59,[2]]]],[[[61,[57]],[6,[5]]],[[59,[2]]]],[[52,[6,[5]]],59],[[[61,[57]],[6,[5]]],59],[[[61,[57]],[35,[5]]],[[59,[2]]]],[[[61,[57]],34],[[59,[2]]]],[[[61,[57]],[6,[62]]],[[59,[2]]]],[[],16],[[],16],[[],16],[[],16],[[],47],[[],47],0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[],63],[[[64,[45]]],18],[[[64,[45]]],18],[[[64,[45]]],18],[[[65,[45]]],18],[[[65,[45]]],18],[[[65,[45]]],18],[[[65,[45]]],18],[[[65,[45]],21],22],[[63,21],22],[[]],[[]],[[]],[[]],[[]],[[]],[[[65,[45]]],4],[45,[[18,[[65,[45]]]]]],[[[65,[45]],4],18],[[[65,[45]],[6,[5]]],18],[[[65,[45]],66],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],39],18],[[[65,[45]],30],18],[[[64,[45]],10,[0,[67,41]]],18],[[[64,[45]],10,[0,[67,41]]],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],36],18],[[[65,[45]],37],18],[[[65,[45]],28],18],[[[65,[45]],31],18],[[[65,[45]],33],18],[[[64,[45]],[0,[67,41]]],18],[[[65,[45]],[7,[2]]],18],[[[65,[45]],10,[0,[67,41]]],18],[[[65,[45]],10,38,10,[0,[67,41]]],18],[[[65,[45]]],18],[[[65,[45]],[7,[2]]],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],10],18],[[[65,[45]],10,2],18],[[[65,[45]],10,38,10,2],18],[[[65,[45]],2],18],[[[65,[45]],10,2],18],[[[65,[45]],10,38,10,2],18],[[[65,[45]],26],18],[[[65,[45]],27],18],[[[65,[45]],38],18],[[[65,[45]],29],18],[[[65,[45]],5],18],[[[65,[45]]],18],[[[65,[45]],10],18],[[[65,[45]],10,38,10],18],[[[64,[45]],[0,[67,41]]],18],[[63,45],[[18,[[65,[45]]]]]],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],47],[[],47],[[],47]],"c":[],"p":[[3,"Config"],[15,"usize"],[4,"Value"],[15,"bool"],[15,"u8"],[15,"slice"],[4,"Option"],[3,"Float"],[3,"Integer"],[15,"str"],[3,"OwnedValue"],[8,"Display"],[4,"Error"],[4,"ValueError"],[8,"Deserializer"],[4,"Result"],[8,"Deserialize"],[6,"Result"],[8,"Read"],[8,"DeserializeOwned"],[3,"Formatter"],[6,"Result"],[3,"Utf8Error"],[3,"Error"],[3,"FromUtf8Error"],[15,"u128"],[15,"u16"],[15,"i32"],[15,"u64"],[15,"f64"],[15,"i64"],[15,"array"],[15,"i8"],[3,"String"],[3,"Vec"],[15,"i128"],[15,"i16"],[15,"u32"],[15,"f32"],[8,"IntoIterator"],[8,"Serialize"],[3,"Iter"],[3,"Demand"],[8,"Serializer"],[8,"WriteBytesExt"],[8,"Error"],[3,"TypeId"],[8,"Reader"],[3,"Deserializer"],[8,"Visitor"],[4,"SymbolMap"],[3,"SliceReader"],[8,"DeserializeSeed"],[4,"Kind"],[3,"Atom"],[4,"Nucleus"],[8,"ReadBytesExt"],[4,"Special"],[6,"Result"],[4,"Cow"],[3,"IoReader"],[3,"IoSliceMut"],[3,"SymbolMap"],[3,"MapSerializer"],[3,"Serializer"],[15,"char"],[8,"Sized"],[13,"Expected"]]},\ +"pot":{"doc":"A concise storage format, written for BonsaiDb.","t":"NNDNNENNNNNNNNNNNNNDGNNNNNNNNEELLLLLLLLLLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLFLLLLLLLLLLAALLLLLLLLLLLLFFLLLLLLLLLLLLLLLLMMNDNNELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDNNNNNNNNDNNNDNENNNNENENNNNNNMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMFFLLFLLLLLLLLLLLLLLLLLLLLLLLLLLFFFFFFFFFFFFFFFFFLLFFFFFFFFDIDLLLLKLLLLLLLLLLLLLLLLLLLLLLLDDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL","n":["Bool","Bytes","Config","Custom","Eof","Error","Expected","Float","ImpreciseCastWouldLoseData","IncompatibleVersion","Integer","InvalidAtomHeader","InvalidKind","InvalidUtf8","Io","Mappings","Message","None","NotAPot","OwnedValue","Result","Sequence","SequenceSizeMustBeKnown","String","TooManyBytesRead","TrailingBytes","UnexpectedKind","Unit","UnknownSymbol","Value","ValueError","allocation_budget","as_bool","as_bytes","as_float","as_integer","as_str","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","custom","custom","custom","custom","de","default","deref","deref_mut","deserialize","deserialize","deserialize","deserialize_as","deserialize_from","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","format","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_mappings","from_reader","from_sequence","from_serialize","from_slice","into","into","into","into","into","into_static","is_empty","mappings","provide","provide","reader","ser","serialize","serialize","serialize","serialize_into","source","to_owned","to_owned","to_owned","to_static","to_string","to_string","to_string","to_vec","to_writer","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","values","kind","value","Borrowed","Deserializer","Owned","Persistent","SymbolMap","borrow","borrow","borrow_mut","borrow_mut","deserialize_any","deserialize_bool","deserialize_byte_buf","deserialize_bytes","deserialize_char","deserialize_enum","deserialize_f32","deserialize_f64","deserialize_i128","deserialize_i16","deserialize_i32","deserialize_i64","deserialize_i8","deserialize_identifier","deserialize_ignored_any","deserialize_map","deserialize_newtype_struct","deserialize_option","deserialize_seq","deserialize_str","deserialize_string","deserialize_struct","deserialize_tuple","deserialize_tuple_struct","deserialize_u128","deserialize_u16","deserialize_u32","deserialize_u64","deserialize_u8","deserialize_unit","deserialize_unit_struct","deserializer_for_slice","end_of_input","fmt","fmt","from","from","into","into","is_human_readable","new","newtype_variant_seed","struct_variant","try_from","try_from","try_into","try_into","tuple_variant","type_id","type_id","unit_variant","variant_seed","Atom","Boolean","Bytes","Bytes","DynamicEnd","DynamicEnd","DynamicMap","DynamicMap","False","Float","Float","Float","Int","Integer","Integer","Kind","Map","Named","Named","None","Nucleus","Sequence","Special","Special","Symbol","True","UInt","Unit","Unit","arg","as_f32","as_f32","as_f64","as_f64","as_float","as_i128","as_i16","as_i32","as_i64","as_i8","as_integer","as_u128","as_u16","as_u32","as_u64","as_u8","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","deserialize","deserialize","eq","eq","eq","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_u8","into","into","into","into","into","into","is_zero","is_zero","kind","nucleus","read_atom","read_atom_header","read_from","read_from","read_header","serialize","serialize","to_owned","to_owned","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","write_atom_header","write_bool","write_bytes","write_f32","write_f64","write_header","write_i128","write_i16","write_i24","write_i32","write_i48","write_i64","write_i8","write_named","write_none","write_special","write_str","write_to","write_to","write_u128","write_u16","write_u24","write_u32","write_u48","write_u64","write_u8","write_unit","IoReader","Reader","SliceReader","borrow","borrow","borrow_mut","borrow_mut","buffered_read_bytes","buffered_read_bytes","buffered_read_bytes","fmt","from","from","from","into","into","is_empty","len","read","read","read_exact","read_exact","read_to_end","read_to_string","read_vectored","try_from","try_from","try_into","try_into","type_id","type_id","MapSerializer","Serializer","SymbolMap","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","default","end","end","end","end","end","end","end","fmt","fmt","from","from","from","into","into","into","is_human_readable","new","serialize_bool","serialize_bytes","serialize_char","serialize_element","serialize_element","serialize_f32","serialize_f64","serialize_field","serialize_field","serialize_field","serialize_field","serialize_i128","serialize_i16","serialize_i32","serialize_i64","serialize_i8","serialize_key","serialize_map","serialize_newtype_struct","serialize_newtype_variant","serialize_none","serialize_seq","serialize_some","serialize_str","serialize_struct","serialize_struct_variant","serialize_tuple","serialize_tuple_struct","serialize_tuple_variant","serialize_u128","serialize_u16","serialize_u32","serialize_u64","serialize_u8","serialize_unit","serialize_unit_struct","serialize_unit_variant","serialize_value","serializer_for","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id"],"q":[[0,"pot"],[155,"pot::ValueError"],[157,"pot::de"],[218,"pot::format"],[383,"pot::reader"],[414,"pot::ser"]],"d":["A boolean value","A value containing arbitrary bytes.","Serialization and deserialization configuration.","A custom deserialization error. These errors originate …","Expected more data but encountered the end of the input.","All errors that Pot may return.","A kind of data was expected, but the Value cannot be …","A floating point value.","A numerical value could not be handled without losing …","Data was written with an incompatible version.","An integer value.","An atom header was incorrectly formatted.","An unknown kind was encountered. Generally a sign that …","String data contained invalid UTF-8 characters.","An IO error occurred.","A sequence of key-value mappings.","A generic error occurred.","A value representing None.","Payload is not a Pot payload.","A Value<'static> wrapper that supports DeserializeOwned.","A result alias that returns Error.","A sequence of values.","A sequence of unknown size cannot be serialized.","A string value.","The amount of data read exceeds the configured maximum …","Extra data appeared at the end of the input.","Encountered an unexpected atom kind.","A value representing unit (()).","A requested symbol id was not found.","A Pot-encoded value. This type can be used to deserialize …","An error from deserializing a type using …","Sets the maximum number of bytes able to be allocated. …","Returns the value as a bool.","Returns the value as bytes, or None if the value is not …","Returns the value as an Float. Returns None if the value …","Returns the value as an Integer. Returns None if the value …","Returns the value as a string, or None if the value is not …","","","","","","","","","","","","","","","","","","","","","Types for deserializing pots.","","","","","","Deserializes a value from a slice using the configured …","Attempts to create an instance of T from this value.","Deserializes a value from a Read implementer using the …","","","","","","","","","","","","Low-level interface for reading and writing the pot format.","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns a new value from an iterator of 2-element tuples …","Restores a previously Pot-serialized value from a Read …","Returns a new value from an iterator of items that can be …","Creates a Value from the given Serde-compatible type.","Restores a previously Pot-serialized value from a slice.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Converts self to a 'static lifetime by cloning any …","Returns true if the value contained is considered empty.","Returns an iterator that iterates over all mappings …","","","Types for reading data.","Types for serializing pots.","","","Serializes a value to a Vec using the configured options.","Serializes a value to a writer using the configured …","","","","","Converts self to a 'static lifetime by cloning all data.","","","","Serialize value using Pot into a Vec<u8>.","Serialize value using Pot into writer.","","","","","","","","","","","","","","","","Returns an iterator that iterates over all values …","The kind of data expected.","The value that was encountered.","A list of borrowed symbols.","Deserializer for the Pot format.","An owned list of symbols.","A mutable reference to an owned list of symbols.","A collection of deserialized symbols.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns a deserializer for slice.","Returns true if the input has been consumed completely.","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","","Returns a new symbol map that will persist symbols between …","","","","","","","","","","","","An encoded Kind, argument, and optional contained value.","A boolean value.","A series of bytes. The argument is the length. The bytes …","A buffer of bytes.","A terminal value for a Self::DynamicMap.","A marker denoting the end of a map with unknown length.","A sequence of key-value pairs with an unknown length.","A marker denoting a map with unknown length is next in the …","The false boolean literal.","A floating point number that can safely convert between …","A floating point value. Argument is the byte length, minus …","A floating point value.","A signed integer. Argument is the byte length, minus one. …","An integer type that can safely convert between other …","An integer value.","The type of an atom.","A list of key-value pairs. Argument is the count of …","A named value. A symbol followed by another value.","A named value.","A None value.","A value contained within an Atom.","A list of atoms. Argument is the count of atoms in the …","A special value type.","A value with a special meaning.","A symbol. If the least-significant bit of the arg is 0, …","The true boolean literal.","An unsigned integer. Argument is the byte length, minus …","A Unit value.","A unit.","The argument contained in the atom header.","Converts this integer to an f32, but only if it can be …","Returns this number as an f32, if it can be done without …","Converts this integer to an f64, but only if it can be …","Returns this number as an f64.","Converts this integer to an f64, but only if it can be …","Returns the contained value as an i64, or an error if the …","Returns the contained value as an i16, or an error if the …","Returns the contained value as an i32, or an error if the …","Returns the contained value as an i64, or an error if the …","Returns the contained value as an i8, or an error if the …","Returns this number as an Integer, if the stored value has …","Returns the contained value as an u64, or an error if the …","Returns the contained value as an u16, or an error if the …","Returns the contained value as an u32, or an error if the …","Returns the contained value as an u64, or an error if the …","Returns the contained value as an u8, or an error if the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Converts from a u8. Returns an error if kind is an invalid …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if the value contained is zero.","Returns true if the value contained is zero.","The type of atom.","The contained value, if any.","Reads an atom.","Reads an atom header (kind and argument).","Reads an integer based on the atom header (kind and …","Reads a floating point number given the atom kind and …","Reads a Pot header. See write_header for more information. …","","","","","","","","","","","","","","","","","","","","","","","","","","","Writes an atom header into writer.","Writes a Kind::Special atom with either Special::True or …","Writes an Kind::Bytes atom with the given value.","Writes an Kind::Float atom with the given value.","Writes an Kind::Float atom with the given value.","Writes the Pot header. A u32 written in big endian. The …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes a Kind::Special atom with Special::Named.","Writes a Kind::Special atom with Special::None.","Writes a Kind::Special atom.","Writes an Kind::Bytes atom with the bytes of the string.","Writes this value using the smallest form possible.","Writes this value using the smallest form possible.","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::Int atom with the given value. Will encode …","Writes an Kind::UInt atom with the given value.","Writes a Kind::Special atom with Special::Unit.","A reader over ReadBytesExt.","A reader that can temporarily buffer bytes read.","Reads data from a slice.","","","","","Reads exactly length bytes and returns a reference to the …","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Returns true if there are no bytes remaining to read.","Returns the remaining bytes to read.","","","","","","","","","","","","","","Serializes map-like values.","A Pot serializer.","A list of previously serialized symbols.","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Returns a new serializer outputting written bytes into …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns a serializer that writes into output and persists …","","","","","","","","",""],"i":[3,3,0,14,13,0,14,3,13,13,3,13,13,13,13,3,13,3,13,0,0,3,13,3,13,13,13,3,13,0,0,1,3,3,3,3,3,13,3,11,14,1,13,3,11,14,1,3,11,1,3,11,1,13,13,14,14,0,1,11,11,3,11,1,3,1,3,11,14,13,13,3,3,11,14,14,1,0,13,13,13,13,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,11,14,1,3,0,3,3,0,13,3,11,14,1,3,3,3,13,14,0,0,3,11,1,1,13,3,11,1,3,13,3,14,0,0,13,3,11,14,1,13,3,11,14,1,13,3,11,14,1,3,68,68,51,0,51,51,0,49,51,49,51,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,51,49,49,51,49,51,49,51,49,51,49,49,49,51,49,51,49,49,51,49,49,0,56,54,56,58,56,58,56,58,0,54,56,54,0,56,0,54,58,56,58,0,54,0,54,54,58,54,58,56,55,9,8,9,8,9,9,9,9,9,9,8,9,9,9,9,9,58,54,9,55,8,56,58,54,9,55,8,56,54,9,8,54,9,8,9,8,54,9,8,54,9,54,9,9,55,8,8,56,58,54,9,9,9,9,9,9,9,9,9,9,9,55,8,8,8,56,54,58,54,9,55,8,56,9,8,55,55,0,0,9,8,0,9,8,54,9,8,9,8,58,58,54,9,55,8,56,58,54,9,55,8,56,58,54,9,55,8,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,8,0,0,0,0,0,0,0,0,0,0,0,52,61,52,61,48,52,61,52,52,52,61,52,61,52,52,52,61,52,61,61,61,61,52,61,52,61,52,61,0,0,0,64,65,63,64,65,63,63,64,64,64,65,65,65,65,65,63,64,65,63,64,65,63,65,65,65,65,65,65,65,65,65,64,64,65,65,65,65,65,65,65,64,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,64,63,64,65,63,64,65,63,64,65,63],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[1,2],1],[3,4],[3,[[7,[[6,[5]]]]]],[3,[[7,[8]]]],[3,[[7,[9]]]],[3,[[7,[10]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[3,3],[11,11],[1,1],[[]],[[]],[[]],[12,13],[12,13],[12,14],[12,14],0,[[],1],[11],[11],[15,[[16,[3]]]],[15,[[16,[11]]]],[[1,[6,[5]]],[[18,[17]]]],[3,[[16,[17,14]]]],[[1,19],[[18,[20]]]],[[3,3],4],[[11,11],4],[[14,14],4],[[13,21],22],[[13,21],22],[[3,21],22],[[3,21],22],[[11,21],22],[[14,21],22],[[14,21],22],[[1,21],22],0,[[]],[23,13],[24,13],[25,13],[26,3],[27,3],[[]],[[[7,[3]]],3],[28,3],[29,3],[30,3],[[[31,[5]]],3],[32,3],[5,3],[33,3],[10,3],[34,3],[35,3],[36,3],[[[37,[5]]],3],[[[37,[3]]],3],[37,3],[38,3],[4,3],[39,3],[[[6,[5]]],3],[[],3],[[]],[[]],[[]],[40,3],[19,[[18,[20]]]],[40,3],[41,[[16,[3,14]]]],[[[6,[5]]],[[18,[17]]]],[[]],[[]],[[]],[[]],[[]],[3,3],[3,4],[3,42],[43],[43],0,0,[[3,44],16],[[11,44],16],[[1,41],[[18,[[37,[5]]]]]],[[1,41,45],18],[13,[[7,[46]]]],[[]],[[]],[[]],[3,3],[[],26],[[],26],[[],26],[41,[[18,[[37,[5]]]]]],[[41,45],18],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],47],[[],47],[[],47],[[],47],[[],47],0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],10,[6,[10]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],10,50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],10,[6,[10]],50],18],[[[49,[48]],2,50],18],[[[49,[48]],10,2,50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],50],18],[[[49,[48]],10,50],18],[[51,[6,[5]]],[[18,[[49,[52]]]]]],[[[49,[52]]],4],[[[49,[48]],21],22],[[51,21],22],[[]],[[]],[[]],[[]],[[[49,[48]]],4],[[],51],[[[49,[48]],53],18],[[[49,[48]],[6,[10]],50],18],[[],16],[[],16],[[],16],[[],16],[[[49,[48]],2,50],18],[[],47],[[],47],[[[49,[48]]],18],[[[49,[48]],53],18],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[9,[[16,[32,13]]]],[8,[[16,[32,13]]]],[9,[[16,[27,13]]]],[8,27],[9,[[16,[8,13]]]],[9,[[16,[36,13]]]],[9,[[16,[28,13]]]],[9,[[16,[35,13]]]],[9,[[16,[34,13]]]],[9,[[16,[33,13]]]],[8,[[16,[9,13]]]],[9,[[16,[29,13]]]],[9,[[16,[38,13]]]],[9,[[16,[39,13]]]],[9,[[16,[30,13]]]],[9,[[16,[5,13]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[54,54],[9,9],[8,8],[[]],[[]],[[]],[15,[[16,[9]]]],[15,[[16,[8]]]],[[54,54],4],[[9,9],4],[[8,8],4],[[],4],[[],4],[[54,21],22],[[9,21],22],[[9,21],22],[[55,21],22],[[8,21],22],[[8,21],22],[[56,21],22],[[]],[[]],[39,9],[36,9],[34,9],[5,9],[33,9],[[]],[28,9],[30,9],[38,9],[29,9],[35,9],[[]],[27,8],[32,8],[[]],[[]],[5,[[16,[54,13]]]],[[]],[[]],[[]],[[]],[[]],[[]],[9,4],[8,4],0,0,[[48,2],[[16,[55,13]]]],[57,[[16,[13]]]],[[54,2,57],[[16,[9,13]]]],[[54,2,57],[[16,[8,13]]]],[57,[[16,[5,13]]]],[[9,44],16],[[8,44],16],[[]],[[]],[[]],[[],26],[[],26],[[],16],[30,[[16,[58]]]],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],47],[[],47],[[],47],[[],47],[[],47],[[],47],[[45,54,[7,[30]]],[[59,[2]]]],[[45,4],[[59,[2]]]],[[45,[6,[5]]],[[59,[2]]]],[[45,32],[[59,[2]]]],[[45,27],[[59,[2]]]],[[45,5],[[59,[2]]]],[[45,36],[[59,[2]]]],[[45,28],[[59,[2]]]],[[45,35],[[59,[2]]]],[[45,35],[[59,[2]]]],[[45,34],[[59,[2]]]],[[45,34],[[59,[2]]]],[[45,33],[[59,[2]]]],[45,[[59,[2]]]],[45,[[59,[2]]]],[[45,58],[[59,[2]]]],[[45,10],[[59,[2]]]],[[9,45],[[59,[2]]]],[[8,45],[[59,[2]]]],[[45,29],[[59,[2]]]],[[45,38],[[59,[2]]]],[[45,39],[[59,[2]]]],[[45,39],[[59,[2]]]],[[45,30],[[59,[2]]]],[[45,30],[[59,[2]]]],[[45,5],[[59,[2]]]],[45,[[59,[2]]]],0,0,0,[[]],[[]],[[]],[[]],[2,[[16,[[60,[[6,[5]]]],13]]]],[[52,2],[[16,[[60,[[6,[5]]]],13]]]],[[[61,[57]],2],[[16,[[60,[[6,[5]]]],13]]]],[[52,21],22],[[[6,[5]]],52],[[]],[[]],[[]],[[]],[52,4],[52,2],[[52,[6,[5]]],[[59,[2]]]],[[[61,[57]],[6,[5]]],[[59,[2]]]],[[52,[6,[5]]],59],[[[61,[57]],[6,[5]]],59],[[[61,[57]],[37,[5]]],[[59,[2]]]],[[[61,[57]],26],[[59,[2]]]],[[[61,[57]],[6,[62]]],[[59,[2]]]],[[],16],[[],16],[[],16],[[],16],[[],47],[[],47],0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[],63],[[[64,[45]]],18],[[[64,[45]]],18],[[[64,[45]]],18],[[[65,[45]]],18],[[[65,[45]]],18],[[[65,[45]]],18],[[[65,[45]]],18],[[[65,[45]],21],22],[[63,21],22],[[]],[[]],[[]],[[]],[[]],[[]],[[[65,[45]]],4],[45,[[18,[[65,[45]]]]]],[[[65,[45]],4],18],[[[65,[45]],[6,[5]]],18],[[[65,[45]],66],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],32],18],[[[65,[45]],27],18],[[[64,[45]],10,[0,[67,41]]],18],[[[64,[45]],10,[0,[67,41]]],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],36],18],[[[65,[45]],28],18],[[[65,[45]],35],18],[[[65,[45]],34],18],[[[65,[45]],33],18],[[[64,[45]],[0,[67,41]]],18],[[[65,[45]],[7,[2]]],18],[[[65,[45]],10,[0,[67,41]]],18],[[[65,[45]],10,39,10,[0,[67,41]]],18],[[[65,[45]]],18],[[[65,[45]],[7,[2]]],18],[[[65,[45]],[0,[67,41]]],18],[[[65,[45]],10],18],[[[65,[45]],10,2],18],[[[65,[45]],10,39,10,2],18],[[[65,[45]],2],18],[[[65,[45]],10,2],18],[[[65,[45]],10,39,10,2],18],[[[65,[45]],29],18],[[[65,[45]],38],18],[[[65,[45]],39],18],[[[65,[45]],30],18],[[[65,[45]],5],18],[[[65,[45]]],18],[[[65,[45]],10],18],[[[65,[45]],10,39,10],18],[[[64,[45]],[0,[67,41]]],18],[[63,45],[[18,[[65,[45]]]]]],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],47],[[],47],[[],47]],"c":[],"p":[[3,"Config"],[15,"usize"],[4,"Value"],[15,"bool"],[15,"u8"],[15,"slice"],[4,"Option"],[3,"Float"],[3,"Integer"],[15,"str"],[3,"OwnedValue"],[8,"Display"],[4,"Error"],[4,"ValueError"],[8,"Deserializer"],[4,"Result"],[8,"Deserialize"],[6,"Result"],[8,"Read"],[8,"DeserializeOwned"],[3,"Formatter"],[6,"Result"],[3,"FromUtf8Error"],[3,"Error"],[3,"Utf8Error"],[3,"String"],[15,"f64"],[15,"i16"],[15,"u128"],[15,"u64"],[15,"array"],[15,"f32"],[15,"i8"],[15,"i64"],[15,"i32"],[15,"i128"],[3,"Vec"],[15,"u16"],[15,"u32"],[8,"IntoIterator"],[8,"Serialize"],[3,"Iter"],[3,"Demand"],[8,"Serializer"],[8,"WriteBytesExt"],[8,"Error"],[3,"TypeId"],[8,"Reader"],[3,"Deserializer"],[8,"Visitor"],[4,"SymbolMap"],[3,"SliceReader"],[8,"DeserializeSeed"],[4,"Kind"],[3,"Atom"],[4,"Nucleus"],[8,"ReadBytesExt"],[4,"Special"],[6,"Result"],[4,"Cow"],[3,"IoReader"],[3,"IoSliceMut"],[3,"SymbolMap"],[3,"MapSerializer"],[3,"Serializer"],[15,"char"],[8,"Sized"],[13,"Expected"]]},\ "xtask":{"doc":"","t":"ELLLLFLLLL","n":["Config","borrow","borrow_mut","from","into","main","paths","try_from","try_into","type_id"],"q":[[0,"xtask"]],"d":["","","","Returns the argument unchanged.","Calls U::from(self).","","","","",""],"i":[0,6,6,6,6,0,6,6,6,6],"f":[0,[[]],[[]],[[]],[[]],[[],1],[[],[[3,[2]]]],[[],4],[[],4],[[],5]],"c":[],"p":[[6,"Result"],[3,"String"],[3,"Vec"],[4,"Result"],[3,"TypeId"],[4,"Config"]]}\ }'); if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; diff --git a/main/src/pot/lib.rs.html b/main/src/pot/lib.rs.html index 3955b588..ab8b3b19 100644 --- a/main/src/pot/lib.rs.html +++ b/main/src/pot/lib.rs.html @@ -771,6 +771,26 @@ 771 772 773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793
#![doc = include_str!("../crate-docs.md")]
 #![forbid(unsafe_code)]
 #![warn(
@@ -805,7 +825,7 @@
 pub use self::error::Error;
 pub use self::value::{OwnedValue, Value, ValueError};
 /// A result alias that returns [`Error`].
-pub type Result<T> = std::result::Result<T, Error>;
+pub type Result<T, E = Error> = std::result::Result<T, E>;
 use serde::de::DeserializeOwned;
 use serde::{Deserialize, Serialize};
 
@@ -1517,7 +1537,7 @@
     #[test]
     fn direct_value_serialization() {
         fn roundtrip<T: Serialize + for<'de> Deserialize<'de> + PartialEq + Debug>(value: &T) {
-            let as_value = Value::from_serialize(value);
+            let as_value = Value::from_serialize(value).unwrap();
             let deserialized = as_value.deserialize_as::<T>().unwrap();
             assert_eq!(&deserialized, value);
         }
@@ -1543,5 +1563,25 @@
         roundtrip(&EnumVariants::TupleTwoArgs(1, 2));
         roundtrip(&EnumVariants::Unit);
     }
+
+    #[test]
+    fn value_error() {
+        #[derive(Debug)]
+        struct Fallible;
+
+        impl Serialize for Fallible {
+            fn serialize<S>(&self, _serializer: S) -> Result<S::Ok, S::Error>
+            where
+                S: Serializer,
+            {
+                Err(serde::ser::Error::custom("oh no!"))
+            }
+        }
+
+        assert_eq!(
+            Value::from_serialize(Fallible),
+            Err(ValueError::Custom(String::from("oh no!")))
+        );
+    }
 }
 
\ No newline at end of file diff --git a/main/src/pot/value.rs.html b/main/src/pot/value.rs.html index f9b8d2b5..57e14cd0 100644 --- a/main/src/pot/value.rs.html +++ b/main/src/pot/value.rs.html @@ -1924,20 +1924,6 @@ 1924 1925 1926 -1927 -1928 -1929 -1930 -1931 -1932 -1933 -1934 -1935 -1936 -1937 -1938 -1939 -1940
use std::borrow::Cow;
 use std::fmt::{Display, Write};
 use std::marker::PhantomData;
@@ -2045,11 +2031,8 @@
     ///     ])
     /// );
     /// ```
-    pub fn from_serialize<T: Serialize>(value: T) -> Self {
-        let Ok(value) = value.serialize(Serializer) else {
-            unreachable!()
-        };
-        value
+    pub fn from_serialize<T: Serialize>(value: T) -> Result<Self, ValueError> {
+        value.serialize(Serializer)
     }
 
     /// Attempts to create an instance of `T` from this value.
@@ -2877,7 +2860,7 @@
 struct Serializer;
 
 impl serde::Serializer for Serializer {
-    type Error = Infallible;
+    type Error = ValueError;
     type Ok = Value<'static>;
     type SerializeMap = MappingsSerializer;
     type SerializeSeq = SequenceSerializer;
@@ -3068,7 +3051,7 @@
 struct SequenceSerializer(Vec<Value<'static>>);
 
 impl SerializeSeq for SequenceSerializer {
-    type Error = Infallible;
+    type Error = ValueError;
     type Ok = Value<'static>;
 
     fn serialize_element<T>(&mut self, value: &T) -> Result<(), Self::Error>
@@ -3085,7 +3068,7 @@
 }
 
 impl SerializeTuple for SequenceSerializer {
-    type Error = Infallible;
+    type Error = ValueError;
     type Ok = Value<'static>;
 
     fn serialize_element<T>(&mut self, value: &T) -> Result<(), Self::Error>
@@ -3102,7 +3085,7 @@
 }
 
 impl SerializeTupleStruct for SequenceSerializer {
-    type Error = Infallible;
+    type Error = ValueError;
     type Ok = Value<'static>;
 
     fn serialize_field<T>(&mut self, value: &T) -> Result<(), Self::Error>
@@ -3124,7 +3107,7 @@
 }
 
 impl SerializeTupleVariant for TupleVariantSerializer {
-    type Error = Infallible;
+    type Error = ValueError;
     type Ok = Value<'static>;
 
     fn serialize_field<T>(&mut self, value: &T) -> Result<(), Self::Error>
@@ -3146,7 +3129,7 @@
 struct MappingsSerializer(Vec<(Value<'static>, Value<'static>)>);
 
 impl SerializeMap for MappingsSerializer {
-    type Error = Infallible;
+    type Error = ValueError;
     type Ok = Value<'static>;
 
     fn serialize_key<T>(&mut self, key: &T) -> Result<(), Self::Error>
@@ -3174,7 +3157,7 @@
 }
 
 impl SerializeStruct for MappingsSerializer {
-    type Error = Infallible;
+    type Error = ValueError;
     type Ok = Value<'static>;
 
     fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<(), Self::Error>
@@ -3199,7 +3182,7 @@
 }
 
 impl SerializeStructVariant for StructVariantSerializer {
-    type Error = Infallible;
+    type Error = ValueError;
     type Ok = Value<'static>;
 
     fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<(), Self::Error>
@@ -3833,28 +3816,8 @@
     }
 }
 
-#[derive(Debug)]
-pub enum Infallible {}
-
-impl serde::ser::Error for Infallible {
-    fn custom<T>(_msg: T) -> Self
-    where
-        T: Display,
-    {
-        unreachable!()
-    }
-}
-
-impl std::error::Error for Infallible {}
-
-impl Display for Infallible {
-    fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        unreachable!()
-    }
-}
-
 /// An error from deserializing a type using [`Value::deserialize_as`].
-#[derive(thiserror::Error, Debug)]
+#[derive(thiserror::Error, Debug, PartialEq)]
 pub enum ValueError {
     /// A kind of data was expected, but the [`Value`] cannot be interpreted as
     /// that kind.
@@ -3878,4 +3841,13 @@
         Self::Custom(msg.to_string())
     }
 }
+
+impl serde::ser::Error for ValueError {
+    fn custom<T>(msg: T) -> Self
+    where
+        T: Display,
+    {
+        Self::Custom(msg.to_string())
+    }
+}
 
\ No newline at end of file