From 5638a2184c24f0f1c1edcc16b75384cd1e91474a Mon Sep 17 00:00:00 2001 From: kl-botsu Date: Sun, 11 Aug 2024 01:25:38 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20khonsula?= =?UTF-8?q?bs/pot@4554256329312f6c330cde0a3a08b81b1a16e43a=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/help.html | 2 +- main/implementors/core/clone/trait.Clone.js | 3 - main/implementors/core/cmp/trait.Eq.js | 3 - main/implementors/core/cmp/trait.PartialEq.js | 3 - main/implementors/core/convert/trait.From.js | 3 - .../core/default/trait.Default.js | 3 - main/implementors/core/error/trait.Error.js | 3 - main/implementors/core/fmt/trait.Debug.js | 3 - main/implementors/core/fmt/trait.Display.js | 3 - .../iter/traits/collect/trait.FromIterator.js | 3 - main/implementors/core/marker/trait.Copy.js | 3 - main/implementors/core/marker/trait.Freeze.js | 4 - main/implementors/core/marker/trait.Send.js | 4 - .../core/marker/trait.StructuralEq.js | 3 - .../core/marker/trait.StructuralPartialEq.js | 3 - main/implementors/core/marker/trait.Sync.js | 4 - main/implementors/core/marker/trait.Unpin.js | 4 - .../core/ops/deref/trait.Deref.js | 3 - .../panic/unwind_safe/trait.RefUnwindSafe.js | 4 - .../panic/unwind_safe/trait.UnwindSafe.js | 4 - main/implementors/serde/de/trait.Error.js | 3 - main/implementors/serde/ser/trait.Error.js | 3 - .../implementors/serde/ser/trait.Serialize.js | 3 - main/implementors/std/io/trait.Read.js | 3 - main/pot/all.html | 2 +- main/pot/de/enum.SymbolStr.html | 1315 +++++++------- main/pot/de/index.html | 4 +- main/pot/de/struct.Deserializer.html | 195 +- main/pot/de/struct.SymbolList.html | 66 +- main/pot/de/struct.SymbolMapRef.html | 32 +- main/pot/de/type.SymbolMap.html | 28 +- main/pot/enum.Compatibility.html | 35 + main/pot/enum.Error.html | 78 +- main/pot/enum.Value.html | 126 +- main/pot/enum.ValueError.html | 72 +- main/pot/fn.from_reader.html | 10 +- main/pot/fn.from_slice.html | 8 +- main/pot/fn.to_vec.html | 8 +- main/pot/fn.to_writer.html | 10 +- main/pot/format/enum.Kind.html | 74 +- main/pot/format/enum.Nucleus.html | 36 +- main/pot/format/enum.Special.html | 60 +- main/pot/format/fn.read_atom.html | 10 +- main/pot/format/fn.read_atom_header.html | 6 +- main/pot/format/fn.read_header.html | 2 +- main/pot/format/fn.write_atom_header.html | 6 +- main/pot/format/fn.write_bool.html | 2 +- main/pot/format/fn.write_bytes.html | 2 +- main/pot/format/fn.write_f32.html | 2 +- main/pot/format/fn.write_f64.html | 2 +- main/pot/format/fn.write_header.html | 2 +- main/pot/format/fn.write_i128.html | 2 +- main/pot/format/fn.write_i16.html | 2 +- main/pot/format/fn.write_i24.html | 2 +- main/pot/format/fn.write_i32.html | 2 +- main/pot/format/fn.write_i48.html | 2 +- main/pot/format/fn.write_i64.html | 2 +- main/pot/format/fn.write_i8.html | 2 +- main/pot/format/fn.write_named.html | 2 +- main/pot/format/fn.write_none.html | 2 +- main/pot/format/fn.write_special.html | 6 +- main/pot/format/fn.write_str.html | 2 +- main/pot/format/fn.write_u128.html | 2 +- main/pot/format/fn.write_u16.html | 2 +- main/pot/format/fn.write_u24.html | 2 +- main/pot/format/fn.write_u32.html | 2 +- main/pot/format/fn.write_u48.html | 2 +- main/pot/format/fn.write_u64.html | 2 +- main/pot/format/fn.write_u8.html | 2 +- main/pot/format/fn.write_unit.html | 2 +- main/pot/format/index.html | 4 +- main/pot/format/struct.Atom.html | 42 +- main/pot/format/struct.Float.html | 58 +- main/pot/format/struct.Integer.html | 78 +- main/pot/format/struct.UnknownSpecial.html | 40 +- main/pot/index.html | 28 +- main/pot/reader/enum.BufferedBytes.html | 38 +- main/pot/reader/index.html | 4 +- main/pot/reader/struct.IoReader.html | 149 +- main/pot/reader/struct.SliceReader.html | 142 +- main/pot/reader/trait.Reader.html | 18 +- main/pot/ser/index.html | 4 +- main/pot/ser/struct.MapSerializer.html | 56 +- main/pot/ser/struct.Serializer.html | 161 +- main/pot/ser/struct.SymbolMap.html | 70 +- .../ser/struct.SymbolMapPopulationError.html | 40 +- main/pot/sidebar-items.js | 2 +- main/pot/struct.Config.html | 56 +- main/pot/struct.OwnedValue.html | 84 +- main/pot/struct.ValueIter.html | 408 ++--- main/pot/type.Result.html | 9 +- main/search-index.js | 12 +- main/search.desc/pot/pot-desc-0-.js | 1 + main/search.desc/xtask/xtask-desc-0-.js | 1 + main/settings.html | 2 +- main/source-files.js | 5 - main/src-files.js | 5 + main/src/pot/de.rs.html | 466 ++--- main/src/pot/error.rs.html | 32 +- main/src/pot/format.rs.html | 68 +- main/src/pot/lib.rs.html | 1568 +---------------- main/src/pot/reader.rs.html | 54 +- main/src/pot/ser.rs.html | 336 ++-- main/src/pot/value.rs.html | 552 +++--- main/src/xtask/main.rs.html | 4 +- main/static.files/ayu-614652228113ac93.css | 1 - .../clipboard-7571035ce49a181d.svg | 1 - main/static.files/dark-1097f8e92a01e3cf.css | 1 - .../favicon-16x16-8b506e7a72182f1c.png | Bin 715 -> 0 bytes main/static.files/light-0f8c037637f9eb3e.css | 1 - main/static.files/main-0795b7d26be81095.js | 12 - main/static.files/main-20a3ad099b048cf2.js | 11 + .../noscript-13285aec31fa243e.css | 1 - .../noscript-df360f571f6edeae.css | 1 + .../static.files/rustdoc-9bb858ba049f1f21.css | 8 - .../static.files/rustdoc-dd39b87e5fcfba68.css | 46 + main/static.files/search-d52510db62a78183.js | 5 + main/static.files/search-f6292fe389d70017.js | 5 - .../static.files/settings-4313503d2e1961c2.js | 17 + .../settings-8c76f75bfb6bd192.css | 3 - .../static.files/settings-de11bff964e9d4e5.js | 17 - .../source-script-106908c7a7964ba4.js | 1 - .../src-script-e66d777a5a92e9b2.js | 1 + main/static.files/storage-118b08c4c78b968e.js | 24 + main/static.files/storage-59fd9b8ccb335783.js | 1 - main/static.files/wheel-7b819b6101059cd0.svg | 1 - main/trait.impl/core/clone/trait.Clone.js | 3 + main/trait.impl/core/cmp/trait.Eq.js | 3 + main/trait.impl/core/cmp/trait.PartialEq.js | 3 + main/trait.impl/core/convert/trait.From.js | 3 + .../core/convert/trait.TryFrom.js | 2 +- main/trait.impl/core/default/trait.Default.js | 3 + main/trait.impl/core/error/trait.Error.js | 3 + main/trait.impl/core/fmt/trait.Debug.js | 3 + main/trait.impl/core/fmt/trait.Display.js | 3 + .../iter/traits/collect/trait.FromIterator.js | 3 + .../double_ended/trait.DoubleEndedIterator.js | 2 +- .../exact_size/trait.ExactSizeIterator.js | 2 +- .../iter/traits/iterator/trait.Iterator.js | 2 +- main/trait.impl/core/marker/trait.Copy.js | 3 + main/trait.impl/core/marker/trait.Freeze.js | 4 + main/trait.impl/core/marker/trait.Send.js | 4 + .../core/marker/trait.StructuralPartialEq.js | 3 + main/trait.impl/core/marker/trait.Sync.js | 4 + main/trait.impl/core/marker/trait.Unpin.js | 4 + main/trait.impl/core/ops/deref/trait.Deref.js | 3 + .../core/ops/deref/trait.DerefMut.js | 2 +- .../panic/unwind_safe/trait.RefUnwindSafe.js | 4 + .../panic/unwind_safe/trait.UnwindSafe.js | 4 + .../khonsu_tools/publish/trait.Config.js | 0 .../khonsu_tools/trait.Config.js | 0 .../pot/reader/trait.Reader.js | 0 .../serde/de/trait.Deserialize.js | 2 +- .../serde/de/trait.Deserializer.js | 2 +- .../serde/de/trait.EnumAccess.js | 2 +- main/trait.impl/serde/de/trait.Error.js | 3 + .../serde/de/trait.VariantAccess.js | 2 +- main/trait.impl/serde/ser/trait.Error.js | 3 + main/trait.impl/serde/ser/trait.Serialize.js | 3 + .../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/trait.impl/std/io/trait.Read.js | 3 + main/type.impl/core/result/enum.Result.js | 3 + main/type.impl/pot/de/struct.SymbolList.js | 3 + main/xtask/all.html | 2 +- main/xtask/enum.Config.html | 20 +- main/xtask/fn.main.html | 2 +- main/xtask/index.html | 2 +- 174 files changed, 3003 insertions(+), 4202 deletions(-) delete mode 100644 main/implementors/core/clone/trait.Clone.js delete mode 100644 main/implementors/core/cmp/trait.Eq.js delete mode 100644 main/implementors/core/cmp/trait.PartialEq.js delete mode 100644 main/implementors/core/convert/trait.From.js delete mode 100644 main/implementors/core/default/trait.Default.js delete mode 100644 main/implementors/core/error/trait.Error.js delete mode 100644 main/implementors/core/fmt/trait.Debug.js delete mode 100644 main/implementors/core/fmt/trait.Display.js delete mode 100644 main/implementors/core/iter/traits/collect/trait.FromIterator.js delete mode 100644 main/implementors/core/marker/trait.Copy.js delete mode 100644 main/implementors/core/marker/trait.Freeze.js delete mode 100644 main/implementors/core/marker/trait.Send.js delete mode 100644 main/implementors/core/marker/trait.StructuralEq.js delete mode 100644 main/implementors/core/marker/trait.StructuralPartialEq.js delete mode 100644 main/implementors/core/marker/trait.Sync.js delete mode 100644 main/implementors/core/marker/trait.Unpin.js delete mode 100644 main/implementors/core/ops/deref/trait.Deref.js delete mode 100644 main/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js delete mode 100644 main/implementors/core/panic/unwind_safe/trait.UnwindSafe.js delete mode 100644 main/implementors/serde/de/trait.Error.js delete mode 100644 main/implementors/serde/ser/trait.Error.js delete mode 100644 main/implementors/serde/ser/trait.Serialize.js delete mode 100644 main/implementors/std/io/trait.Read.js create mode 100644 main/pot/enum.Compatibility.html create mode 100644 main/search.desc/pot/pot-desc-0-.js create mode 100644 main/search.desc/xtask/xtask-desc-0-.js delete mode 100644 main/source-files.js create mode 100644 main/src-files.js delete mode 100644 main/static.files/ayu-614652228113ac93.css delete mode 100644 main/static.files/clipboard-7571035ce49a181d.svg delete mode 100644 main/static.files/dark-1097f8e92a01e3cf.css delete mode 100644 main/static.files/favicon-16x16-8b506e7a72182f1c.png delete mode 100644 main/static.files/light-0f8c037637f9eb3e.css delete mode 100644 main/static.files/main-0795b7d26be81095.js create mode 100644 main/static.files/main-20a3ad099b048cf2.js delete mode 100644 main/static.files/noscript-13285aec31fa243e.css create mode 100644 main/static.files/noscript-df360f571f6edeae.css delete mode 100644 main/static.files/rustdoc-9bb858ba049f1f21.css create mode 100644 main/static.files/rustdoc-dd39b87e5fcfba68.css create mode 100644 main/static.files/search-d52510db62a78183.js delete mode 100644 main/static.files/search-f6292fe389d70017.js create mode 100644 main/static.files/settings-4313503d2e1961c2.js delete mode 100644 main/static.files/settings-8c76f75bfb6bd192.css delete mode 100644 main/static.files/settings-de11bff964e9d4e5.js delete mode 100644 main/static.files/source-script-106908c7a7964ba4.js create mode 100644 main/static.files/src-script-e66d777a5a92e9b2.js create mode 100644 main/static.files/storage-118b08c4c78b968e.js delete mode 100644 main/static.files/storage-59fd9b8ccb335783.js delete mode 100644 main/static.files/wheel-7b819b6101059cd0.svg create mode 100644 main/trait.impl/core/clone/trait.Clone.js create mode 100644 main/trait.impl/core/cmp/trait.Eq.js create mode 100644 main/trait.impl/core/cmp/trait.PartialEq.js create mode 100644 main/trait.impl/core/convert/trait.From.js rename main/{implementors => trait.impl}/core/convert/trait.TryFrom.js (76%) create mode 100644 main/trait.impl/core/default/trait.Default.js create mode 100644 main/trait.impl/core/error/trait.Error.js create mode 100644 main/trait.impl/core/fmt/trait.Debug.js create mode 100644 main/trait.impl/core/fmt/trait.Display.js create mode 100644 main/trait.impl/core/iter/traits/collect/trait.FromIterator.js rename main/{implementors => trait.impl}/core/iter/traits/double_ended/trait.DoubleEndedIterator.js (87%) rename main/{implementors => trait.impl}/core/iter/traits/exact_size/trait.ExactSizeIterator.js (87%) rename main/{implementors => trait.impl}/core/iter/traits/iterator/trait.Iterator.js (86%) create mode 100644 main/trait.impl/core/marker/trait.Copy.js create mode 100644 main/trait.impl/core/marker/trait.Freeze.js create mode 100644 main/trait.impl/core/marker/trait.Send.js create mode 100644 main/trait.impl/core/marker/trait.StructuralPartialEq.js create mode 100644 main/trait.impl/core/marker/trait.Sync.js create mode 100644 main/trait.impl/core/marker/trait.Unpin.js create mode 100644 main/trait.impl/core/ops/deref/trait.Deref.js rename main/{implementors => trait.impl}/core/ops/deref/trait.DerefMut.js (85%) create mode 100644 main/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js create mode 100644 main/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js rename main/{implementors => trait.impl}/khonsu_tools/publish/trait.Config.js (100%) rename main/{implementors => trait.impl}/khonsu_tools/trait.Config.js (100%) rename main/{implementors => trait.impl}/pot/reader/trait.Reader.js (100%) rename main/{implementors => trait.impl}/serde/de/trait.Deserialize.js (80%) rename main/{implementors => trait.impl}/serde/de/trait.Deserializer.js (89%) rename main/{implementors => trait.impl}/serde/de/trait.EnumAccess.js (89%) create mode 100644 main/trait.impl/serde/de/trait.Error.js rename main/{implementors => trait.impl}/serde/de/trait.VariantAccess.js (89%) create mode 100644 main/trait.impl/serde/ser/trait.Error.js create mode 100644 main/trait.impl/serde/ser/trait.Serialize.js rename main/{implementors => trait.impl}/serde/ser/trait.SerializeMap.js (87%) rename main/{implementors => trait.impl}/serde/ser/trait.SerializeSeq.js (87%) rename main/{implementors => trait.impl}/serde/ser/trait.SerializeStruct.js (87%) rename main/{implementors => trait.impl}/serde/ser/trait.SerializeStructVariant.js (88%) rename main/{implementors => trait.impl}/serde/ser/trait.SerializeTuple.js (87%) rename main/{implementors => trait.impl}/serde/ser/trait.SerializeTupleStruct.js (88%) rename main/{implementors => trait.impl}/serde/ser/trait.SerializeTupleVariant.js (88%) rename main/{implementors => trait.impl}/serde/ser/trait.Serializer.js (87%) create mode 100644 main/trait.impl/std/io/trait.Read.js create mode 100644 main/type.impl/core/result/enum.Result.js create mode 100644 main/type.impl/pot/de/struct.SymbolList.js diff --git a/main/help.html b/main/help.html index 90305fd1..495a11da 100644 --- a/main/help.html +++ b/main/help.html @@ -1 +1 @@ -Rustdoc help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/main/implementors/core/clone/trait.Clone.js b/main/implementors/core/clone/trait.Clone.js deleted file mode 100644 index b15e2f05..00000000 --- a/main/implementors/core/clone/trait.Clone.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Clone for Config"],["impl<'a> Clone for Value<'a>"],["impl Clone for Float"],["impl Clone for OwnedValue"],["impl Clone for Integer"],["impl Clone for Kind"],["impl Clone for UnknownSpecial"]] -};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.Eq.js b/main/implementors/core/cmp/trait.Eq.js deleted file mode 100644 index 31413c8d..00000000 --- a/main/implementors/core/cmp/trait.Eq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Eq for Integer"],["impl Eq for Kind"],["impl Eq for UnknownSpecial"]] -};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 deleted file mode 100644 index bd4b4b5e..00000000 --- a/main/implementors/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl<'a, 'b> PartialEq<Value<'b>> for Value<'a>"],["impl PartialEq<Kind> for Kind"],["impl PartialEq<UnknownSpecial> for UnknownSpecial"],["impl PartialEq<OwnedValue> for OwnedValue"],["impl PartialEq<ValueError> for ValueError"],["impl PartialEq<Float> for Float"],["impl PartialEq<Integer> 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/convert/trait.From.js b/main/implementors/core/convert/trait.From.js deleted file mode 100644 index 6bb5693e..00000000 --- a/main/implementors/core/convert/trait.From.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl From<FromUtf8Error> for Error"],["impl<'a> From<i16> for Value<'a>"],["impl<'a> From<Vec<u8, Global>> for Value<'a>"],["impl<'a> From<&'a str> for Value<'a>"],["impl<'a> From<()> for Value<'a>"],["impl<'a> From<Vec<(Value<'a>, Value<'a>), Global>> for Value<'a>"],["impl From<i64> for Integer"],["impl<'a> From<&'a [u8]> for SliceReader<'a>"],["impl From<u8> for Integer"],["impl<'a> From<SliceReader<'a>> for &'a [u8]"],["impl<'a> From<u16> for Value<'a>"],["impl<'a> From<u32> for Value<'a>"],["impl From<i32> for Integer"],["impl From<u32> for Integer"],["impl From<UnknownSpecial> for Error"],["impl From<Utf8Error> for Error"],["impl<'a> From<i128> for Value<'a>"],["impl From<u128> for Integer"],["impl<'a> From<i8> for Value<'a>"],["impl<'a> From<u64> for Value<'a>"],["impl<'a> From<f64> for Value<'a>"],["impl<'a> From<Option<Value<'a>>> for Value<'a>"],["impl<'a> From<bool> for Value<'a>"],["impl<'a> From<String> for Value<'a>"],["impl From<f32> for Float"],["impl<'a> From<i64> for Value<'a>"],["impl<'a> From<&'a Value<'a>> for OwnedValue"],["impl<'a> From<f32> for Value<'a>"],["impl From<u16> for Integer"],["impl<'a, const N: usize> From<&'a [u8; N]> for Value<'a>"],["impl<'a> From<i32> for Value<'a>"],["impl<'a> From<Value<'a>> for OwnedValue"],["impl From<u64> for Integer"],["impl<'a> From<u8> for Value<'a>"],["impl<'a> From<Vec<Value<'a>, Global>> for Value<'a>"],["impl From<i16> for Integer"],["impl From<i8> for Integer"],["impl<'a> From<u128> for Value<'a>"],["impl From<Error> for Error"],["impl From<i128> for Integer"],["impl<'a> From<&'a [u8]> for Value<'a>"],["impl From<f64> 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/default/trait.Default.js b/main/implementors/core/default/trait.Default.js deleted file mode 100644 index 4a974ea5..00000000 --- a/main/implementors/core/default/trait.Default.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Default for SymbolList<'_>"],["impl Default for Config"],["impl Default for SymbolMap"]] -};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/error/trait.Error.js b/main/implementors/core/error/trait.Error.js deleted file mode 100644 index 93566917..00000000 --- a/main/implementors/core/error/trait.Error.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Error for Error"],["impl Error for SymbolMapPopulationError"],["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/core/fmt/trait.Debug.js b/main/implementors/core/fmt/trait.Debug.js deleted file mode 100644 index 80036311..00000000 --- a/main/implementors/core/fmt/trait.Debug.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Debug for Special"],["impl<'a> Debug for SliceReader<'a>"],["impl<'de> Debug for Atom<'de>"],["impl Debug for Config"],["impl Debug for UnknownSpecial"],["impl Debug for SymbolMapPopulationError"],["impl Debug for Error"],["impl Debug for ValueError"],["impl<'de> Debug for BufferedBytes<'de>"],["impl<'a, 'de> Debug for SymbolMapRef<'a, 'de>"],["impl Debug for Float"],["impl<'a, W: WriteBytesExt> Debug for Serializer<'a, W>"],["impl Debug for OwnedValue"],["impl Debug for SymbolMap"],["impl<'s, 'de, R: Reader<'de>> Debug for Deserializer<'s, 'de, R>"],["impl Debug for Integer"],["impl<'a> Debug for Value<'a>"],["impl<'de> Debug for SymbolList<'de>"],["impl<'de> Debug for Nucleus<'de>"],["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 deleted file mode 100644 index fab9e75c..00000000 --- a/main/implementors/core/fmt/trait.Display.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Display for UnknownSpecial"],["impl Display for Error"],["impl Display for Integer"],["impl Display for SymbolMapPopulationError"],["impl<'a> Display for Value<'a>"],["impl Display for Float"],["impl Display 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/core/iter/traits/collect/trait.FromIterator.js b/main/implementors/core/iter/traits/collect/trait.FromIterator.js deleted file mode 100644 index 6c099226..00000000 --- a/main/implementors/core/iter/traits/collect/trait.FromIterator.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl<'a, A> FromIterator<A> for Value<'a>where\n A: Into<Value<'a>>,"],["impl<'a, K, V> FromIterator<(K, V)> for Value<'a>where\n K: Into<Value<'a>>,\n V: Into<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/marker/trait.Copy.js b/main/implementors/core/marker/trait.Copy.js deleted file mode 100644 index 8be461cd..00000000 --- a/main/implementors/core/marker/trait.Copy.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Copy for Integer"],["impl Copy for Float"],["impl Copy for Kind"],["impl Copy for UnknownSpecial"]] -};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.Freeze.js b/main/implementors/core/marker/trait.Freeze.js deleted file mode 100644 index 977d7434..00000000 --- a/main/implementors/core/marker/trait.Freeze.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"pot":[["impl<'s, 'de, R> Freeze for Deserializer<'s, 'de, R>where\n R: Freeze,",1,["pot::de::Deserializer"]],["impl<'a, 'de> Freeze for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'de> Freeze for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de, 'ephemeral> Freeze for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl Freeze for Error",1,["pot::error::Error"]],["impl Freeze for Kind",1,["pot::format::Kind"]],["impl Freeze for Special",1,["pot::format::Special"]],["impl Freeze for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl Freeze for Integer",1,["pot::format::Integer"]],["impl<'de> Freeze for Atom<'de>",1,["pot::format::Atom"]],["impl Freeze for Float",1,["pot::format::Float"]],["impl<'de> Freeze for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> Freeze for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'a> Freeze for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<R> Freeze for IoReader<R>where\n R: Freeze,",1,["pot::reader::IoReader"]],["impl<'a, W> Freeze for Serializer<'a, W>where\n W: Freeze,",1,["pot::ser::Serializer"]],["impl<'de, 'a, W> Freeze for MapSerializer<'de, 'a, W>",1,["pot::ser::MapSerializer"]],["impl Freeze for SymbolMap",1,["pot::ser::SymbolMap"]],["impl Freeze for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl<'a> Freeze for Value<'a>",1,["pot::value::Value"]],["impl Freeze for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> Freeze for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl Freeze for ValueError",1,["pot::value::ValueError"]],["impl Freeze for Config",1,["pot::Config"]]], -"xtask":[["impl Freeze for Config",1,["xtask::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/marker/trait.Send.js b/main/implementors/core/marker/trait.Send.js deleted file mode 100644 index abd337ad..00000000 --- a/main/implementors/core/marker/trait.Send.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"pot":[["impl<'s, 'de, R> Send for Deserializer<'s, 'de, R>where\n R: Send,",1,["pot::de::Deserializer"]],["impl<'a, 'de> Send for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'de> Send for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de, 'ephemeral> Send for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl Send for Error",1,["pot::error::Error"]],["impl Send for Kind",1,["pot::format::Kind"]],["impl Send for Special",1,["pot::format::Special"]],["impl Send for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl Send for Integer",1,["pot::format::Integer"]],["impl<'de> Send for Atom<'de>",1,["pot::format::Atom"]],["impl Send for Float",1,["pot::format::Float"]],["impl<'de> Send for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> Send for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'a> Send for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<R> Send for IoReader<R>where\n R: Send,",1,["pot::reader::IoReader"]],["impl<'a, W> Send for Serializer<'a, W>where\n W: Send,",1,["pot::ser::Serializer"]],["impl<'de, 'a, W> Send for MapSerializer<'de, 'a, W>where\n W: Send,",1,["pot::ser::MapSerializer"]],["impl Send for SymbolMap",1,["pot::ser::SymbolMap"]],["impl Send for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl<'a> Send for Value<'a>",1,["pot::value::Value"]],["impl Send for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> Send for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl Send for ValueError",1,["pot::value::ValueError"]],["impl Send for Config",1,["pot::Config"]]], -"xtask":[["impl Send for Config",1,["xtask::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/marker/trait.StructuralEq.js b/main/implementors/core/marker/trait.StructuralEq.js deleted file mode 100644 index d19ee791..00000000 --- a/main/implementors/core/marker/trait.StructuralEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl StructuralEq for Integer"],["impl StructuralEq for Kind"],["impl StructuralEq for UnknownSpecial"]] -};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 deleted file mode 100644 index 5cd6566d..00000000 --- a/main/implementors/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl StructuralPartialEq for Integer"],["impl StructuralPartialEq for Float"],["impl StructuralPartialEq for ValueError"],["impl StructuralPartialEq for UnknownSpecial"],["impl StructuralPartialEq for Kind"],["impl StructuralPartialEq for OwnedValue"]] -};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.Sync.js b/main/implementors/core/marker/trait.Sync.js deleted file mode 100644 index 1fafcd3b..00000000 --- a/main/implementors/core/marker/trait.Sync.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"pot":[["impl<'s, 'de, R> Sync for Deserializer<'s, 'de, R>where\n R: Sync,",1,["pot::de::Deserializer"]],["impl<'a, 'de> Sync for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'de> Sync for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de, 'ephemeral> Sync for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl Sync for Error",1,["pot::error::Error"]],["impl Sync for Kind",1,["pot::format::Kind"]],["impl Sync for Special",1,["pot::format::Special"]],["impl Sync for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl Sync for Integer",1,["pot::format::Integer"]],["impl<'de> Sync for Atom<'de>",1,["pot::format::Atom"]],["impl Sync for Float",1,["pot::format::Float"]],["impl<'de> Sync for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> Sync for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'a> Sync for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<R> Sync for IoReader<R>where\n R: Sync,",1,["pot::reader::IoReader"]],["impl<'a, W> Sync for Serializer<'a, W>where\n W: Sync,",1,["pot::ser::Serializer"]],["impl<'de, 'a, W> Sync for MapSerializer<'de, 'a, W>where\n W: Sync,",1,["pot::ser::MapSerializer"]],["impl Sync for SymbolMap",1,["pot::ser::SymbolMap"]],["impl Sync for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl<'a> Sync for Value<'a>",1,["pot::value::Value"]],["impl Sync for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> Sync for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl Sync for ValueError",1,["pot::value::ValueError"]],["impl Sync for Config",1,["pot::Config"]]], -"xtask":[["impl Sync for Config",1,["xtask::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/marker/trait.Unpin.js b/main/implementors/core/marker/trait.Unpin.js deleted file mode 100644 index c229aa3d..00000000 --- a/main/implementors/core/marker/trait.Unpin.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"pot":[["impl<'s, 'de, R> Unpin for Deserializer<'s, 'de, R>where\n R: Unpin,",1,["pot::de::Deserializer"]],["impl<'a, 'de> Unpin for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'de> Unpin for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de, 'ephemeral> Unpin for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl Unpin for Error",1,["pot::error::Error"]],["impl Unpin for Kind",1,["pot::format::Kind"]],["impl Unpin for Special",1,["pot::format::Special"]],["impl Unpin for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl Unpin for Integer",1,["pot::format::Integer"]],["impl<'de> Unpin for Atom<'de>",1,["pot::format::Atom"]],["impl Unpin for Float",1,["pot::format::Float"]],["impl<'de> Unpin for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> Unpin for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'a> Unpin for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<R> Unpin for IoReader<R>where\n R: Unpin,",1,["pot::reader::IoReader"]],["impl<'a, W> Unpin for Serializer<'a, W>where\n W: Unpin,",1,["pot::ser::Serializer"]],["impl<'de, 'a, W> Unpin for MapSerializer<'de, 'a, W>",1,["pot::ser::MapSerializer"]],["impl Unpin for SymbolMap",1,["pot::ser::SymbolMap"]],["impl Unpin for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl<'a> Unpin for Value<'a>",1,["pot::value::Value"]],["impl Unpin for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> Unpin for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl Unpin for ValueError",1,["pot::value::ValueError"]],["impl Unpin for Config",1,["pot::Config"]]], -"xtask":[["impl Unpin for Config",1,["xtask::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/ops/deref/trait.Deref.js b/main/implementors/core/ops/deref/trait.Deref.js deleted file mode 100644 index 6a59da87..00000000 --- a/main/implementors/core/ops/deref/trait.Deref.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Deref for OwnedValue"],["impl Deref for SymbolStr<'_, '_>"]] -};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/panic/unwind_safe/trait.RefUnwindSafe.js b/main/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js deleted file mode 100644 index 1747d0b0..00000000 --- a/main/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"pot":[["impl<'s, 'de, R> RefUnwindSafe for Deserializer<'s, 'de, R>where\n R: RefUnwindSafe,",1,["pot::de::Deserializer"]],["impl<'a, 'de> RefUnwindSafe for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'de> RefUnwindSafe for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de, 'ephemeral> RefUnwindSafe for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl !RefUnwindSafe for Error",1,["pot::error::Error"]],["impl RefUnwindSafe for Kind",1,["pot::format::Kind"]],["impl RefUnwindSafe for Special",1,["pot::format::Special"]],["impl RefUnwindSafe for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl RefUnwindSafe for Integer",1,["pot::format::Integer"]],["impl<'de> RefUnwindSafe for Atom<'de>",1,["pot::format::Atom"]],["impl RefUnwindSafe for Float",1,["pot::format::Float"]],["impl<'de> RefUnwindSafe for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> RefUnwindSafe for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'a> RefUnwindSafe for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<R> RefUnwindSafe for IoReader<R>where\n R: RefUnwindSafe,",1,["pot::reader::IoReader"]],["impl<'a, W> RefUnwindSafe for Serializer<'a, W>where\n W: RefUnwindSafe,",1,["pot::ser::Serializer"]],["impl<'de, 'a, W> RefUnwindSafe for MapSerializer<'de, 'a, W>where\n W: RefUnwindSafe,",1,["pot::ser::MapSerializer"]],["impl RefUnwindSafe for SymbolMap",1,["pot::ser::SymbolMap"]],["impl RefUnwindSafe for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl<'a> RefUnwindSafe for Value<'a>",1,["pot::value::Value"]],["impl RefUnwindSafe for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> RefUnwindSafe for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl RefUnwindSafe for ValueError",1,["pot::value::ValueError"]],["impl RefUnwindSafe for Config",1,["pot::Config"]]], -"xtask":[["impl RefUnwindSafe for Config",1,["xtask::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/panic/unwind_safe/trait.UnwindSafe.js b/main/implementors/core/panic/unwind_safe/trait.UnwindSafe.js deleted file mode 100644 index 048209c7..00000000 --- a/main/implementors/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,4 +0,0 @@ -(function() {var implementors = { -"pot":[["impl<'s, 'de, R> !UnwindSafe for Deserializer<'s, 'de, R>",1,["pot::de::Deserializer"]],["impl<'a, 'de> !UnwindSafe for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'de> UnwindSafe for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de, 'ephemeral> UnwindSafe for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl !UnwindSafe for Error",1,["pot::error::Error"]],["impl UnwindSafe for Kind",1,["pot::format::Kind"]],["impl UnwindSafe for Special",1,["pot::format::Special"]],["impl UnwindSafe for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl UnwindSafe for Integer",1,["pot::format::Integer"]],["impl<'de> UnwindSafe for Atom<'de>",1,["pot::format::Atom"]],["impl UnwindSafe for Float",1,["pot::format::Float"]],["impl<'de> UnwindSafe for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> UnwindSafe for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'a> UnwindSafe for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<R> UnwindSafe for IoReader<R>where\n R: UnwindSafe,",1,["pot::reader::IoReader"]],["impl<'a, W> !UnwindSafe for Serializer<'a, W>",1,["pot::ser::Serializer"]],["impl<'de, 'a, W> !UnwindSafe for MapSerializer<'de, 'a, W>",1,["pot::ser::MapSerializer"]],["impl UnwindSafe for SymbolMap",1,["pot::ser::SymbolMap"]],["impl UnwindSafe for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl<'a> UnwindSafe for Value<'a>",1,["pot::value::Value"]],["impl UnwindSafe for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> UnwindSafe for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl UnwindSafe for ValueError",1,["pot::value::ValueError"]],["impl UnwindSafe for Config",1,["pot::Config"]]], -"xtask":[["impl UnwindSafe for Config",1,["xtask::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/serde/de/trait.Error.js b/main/implementors/serde/de/trait.Error.js deleted file mode 100644 index 574afb30..00000000 --- a/main/implementors/serde/de/trait.Error.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"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/ser/trait.Error.js b/main/implementors/serde/ser/trait.Error.js deleted file mode 100644 index ccd288c9..00000000 --- a/main/implementors/serde/ser/trait.Error.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Error for SymbolMapPopulationError"],["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 deleted file mode 100644 index 5dd755bc..00000000 --- a/main/implementors/serde/ser/trait.Serialize.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl Serialize for OwnedValue"],["impl<'a> Serialize for Value<'a>"],["impl Serialize for SymbolMap"],["impl Serialize for SymbolMap"]] -};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 deleted file mode 100644 index 896abc6a..00000000 --- a/main/implementors/std/io/trait.Read.js +++ /dev/null @@ -1,3 +0,0 @@ -(function() {var implementors = { -"pot":[["impl<R: ReadBytesExt> Read for IoReader<R>"],["impl<'a> Read for SliceReader<'a>"]] -};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/pot/all.html b/main/pot/all.html index f00a9250..6202fa3f 100644 --- a/main/pot/all.html +++ b/main/pot/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate
\ No newline at end of file diff --git a/main/pot/de/enum.SymbolStr.html b/main/pot/de/enum.SymbolStr.html index 3bd2152f..bbfcf7f6 100644 --- a/main/pot/de/enum.SymbolStr.html +++ b/main/pot/de/enum.SymbolStr.html @@ -1,32 +1,32 @@ -SymbolStr in pot::de - Rust

Enum pot::de::SymbolStr

source ·
pub enum SymbolStr<'de, 'ephemeral> {
-    Data(&'de str),
-    InList(&'ephemeral str),
+SymbolStr in pot::de - Rust

Enum pot::de::SymbolStr

source ·
pub enum SymbolStr<'de, 'ephemeral> {
+    Data(&'de str),
+    InList(&'ephemeral str),
 }
Expand description

A symbol stored in a SymbolList.

-

Variants§

§

Data(&'de str)

A symbol that has been borrowed from the data being deserialized.

-
§

InList(&'ephemeral str)

A symbol that is stored inside of the SymbolList.

-

Methods from Deref<Target = str>§

1.0.0 · source

pub fn len(&self) -> usize

Returns the length of self.

-

This length is in bytes, not chars or graphemes. In other words, +

Variants§

§

Data(&'de str)

A symbol that has been borrowed from the data being deserialized.

+
§

InList(&'ephemeral str)

A symbol that is stored inside of the SymbolList.

+

Methods from Deref<Target = str>§

1.0.0 · source

pub fn len(&self) -> usize

Returns the length of self.

+

This length is in bytes, not chars or graphemes. In other words, it might not be what a human considers the length of the string.

-
Examples
-
let len = "foo".len();
+
§Examples
+
let len = "foo".len();
 assert_eq!(3, len);
 
-assert_eq!("ƒoo".len(), 4); // fancy f!
-assert_eq!("ƒoo".chars().count(), 3);
-
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if self has a length of zero bytes.

-
Examples
-
let s = "";
+assert_eq!("ƒoo".len(), 4); // fancy f!
+assert_eq!("ƒoo".chars().count(), 3);
+
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if self has a length of zero bytes.

+
§Examples
+
let s = "";
 assert!(s.is_empty());
 
-let s = "not empty";
+let s = "not empty";
 assert!(!s.is_empty());
-
1.9.0 · source

pub fn is_char_boundary(&self, index: usize) -> bool

Checks that index-th byte is the first byte in a UTF-8 code point +

1.9.0 · source

pub fn is_char_boundary(&self, index: usize) -> bool

Checks that index-th byte is the first byte in a UTF-8 code point sequence or the end of the string.

The start and end of the string (when index == self.len()) are considered to be boundaries.

Returns false if index is greater than self.len().

-
Examples
-
let s = "Löwe 老虎 Léopard";
+
§Examples
+
let s = "Löwe 老虎 Léopard";
 assert!(s.is_char_boundary(0));
 // start of `老`
 assert!(s.is_char_boundary(6));
@@ -37,57 +37,56 @@ 
Examples
// third byte of `老` assert!(!s.is_char_boundary(8));
-
source

pub fn floor_char_boundary(&self, index: usize) -> usize

🔬This is a nightly-only experimental API. (round_char_boundary)

Finds the closest x not exceeding index where is_char_boundary(x) is true.

+
source

pub fn floor_char_boundary(&self, index: usize) -> usize

🔬This is a nightly-only experimental API. (round_char_boundary)

Finds the closest x not exceeding index where is_char_boundary(x) is true.

This method can help you truncate a string so that it’s still valid UTF-8, but doesn’t exceed a given number of bytes. Note that this is done purely at the character level and can still visually split graphemes, even though the underlying characters aren’t split. For example, the emoji 🧑‍🔬 (scientist) could be split so that the string only includes 🧑 (person) instead.

-
Examples
+
§Examples
#![feature(round_char_boundary)]
-let s = "❤️🧡💛💚💙💜";
+let s = "❤️🧡💛💚💙💜";
 assert_eq!(s.len(), 26);
 assert!(!s.is_char_boundary(13));
 
 let closest = s.floor_char_boundary(13);
 assert_eq!(closest, 10);
-assert_eq!(&s[..closest], "❤️🧡");
-
source

pub fn ceil_char_boundary(&self, index: usize) -> usize

🔬This is a nightly-only experimental API. (round_char_boundary)

Finds the closest x not below index where is_char_boundary(x) is true.

-

This method is the natural complement to floor_char_boundary. See that method +assert_eq!(&s[..closest], "❤️🧡");

+
source

pub fn ceil_char_boundary(&self, index: usize) -> usize

🔬This is a nightly-only experimental API. (round_char_boundary)

Finds the closest x not below index where is_char_boundary(x) is true.

+

If index is greater than the length of the string, this returns the length of the string.

+

This method is the natural complement to floor_char_boundary. See that method for more details.

-
Panics
-

Panics if index > self.len().

-
Examples
+
§Examples
#![feature(round_char_boundary)]
-let s = "❤️🧡💛💚💙💜";
+let s = "❤️🧡💛💚💙💜";
 assert_eq!(s.len(), 26);
 assert!(!s.is_char_boundary(13));
 
 let closest = s.ceil_char_boundary(13);
 assert_eq!(closest, 14);
-assert_eq!(&s[..closest], "❤️🧡💛");
-
1.0.0 · source

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

Converts a string slice to a byte slice. To convert the byte slice back -into a string slice, use the from_utf8 function.

-
Examples
-
let bytes = "bors".as_bytes();
-assert_eq!(b"bors", bytes);
-
1.0.0 · source

pub fn as_ptr(&self) -> *const u8

Converts a string slice to a raw pointer.

+assert_eq!(&s[..closest], "❤️🧡💛");
+
1.0.0 · source

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

Converts a string slice to a byte slice. To convert the byte slice back +into a string slice, use the from_utf8 function.

+
§Examples
+
let bytes = "bors".as_bytes();
+assert_eq!(b"bors", bytes);
+
1.0.0 · source

pub fn as_ptr(&self) -> *const u8

Converts a string slice to a raw pointer.

As string slices are a slice of bytes, the raw pointer points to a -u8. This pointer will be pointing to the first byte of the string +u8. This pointer will be pointing to the first byte of the string slice.

The caller must ensure that the returned pointer is never written to. -If you need to mutate the contents of the string slice, use as_mut_ptr.

-
Examples
-
let s = "Hello";
+If you need to mutate the contents of the string slice, use as_mut_ptr.

+
§Examples
+
let s = "Hello";
 let ptr = s.as_ptr();
-
1.20.0 · source

pub fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<str>>::Output>where - I: SliceIndex<str>,

Returns a subslice of str.

+
1.20.0 · source

pub fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<str>>::Output>
where + I: SliceIndex<str>,

Returns a subslice of str.

This is the non-panicking alternative to indexing the str. Returns -None whenever equivalent indexing operation would panic.

-
Examples
-
let v = String::from("🗻∈🌏");
+None whenever equivalent indexing operation would panic.

+
§Examples
+
let v = String::from("🗻∈🌏");
 
-assert_eq!(Some("🗻"), v.get(0..4));
+assert_eq!(Some("🗻"), v.get(0..4));
 
 // indices not on UTF-8 sequence boundaries
 assert!(v.get(1..).is_none());
@@ -95,10 +94,10 @@ 
Examples
// out of bounds assert!(v.get(..42).is_none());
-
1.20.0 · source

pub unsafe fn get_unchecked<I>(&self, i: I) -> &<I as SliceIndex<str>>::Outputwhere - I: SliceIndex<str>,

Returns an unchecked subslice of str.

+
1.20.0 · source

pub unsafe fn get_unchecked<I>(&self, i: I) -> &<I as SliceIndex<str>>::Output
where + I: SliceIndex<str>,

Returns an unchecked subslice of str.

This is the unchecked alternative to indexing the str.

-
Safety
+
§Safety

Callers of this function are responsible that these preconditions are satisfied:

    @@ -108,22 +107,22 @@
    Safety

Failing that, the returned string slice may reference invalid memory or violate the invariants communicated by the str type.

-
Examples
-
let v = "🗻∈🌏";
+
§Examples
+
let v = "🗻∈🌏";
 unsafe {
-    assert_eq!("🗻", v.get_unchecked(0..4));
-    assert_eq!("∈", v.get_unchecked(4..7));
-    assert_eq!("🌏", v.get_unchecked(7..11));
+    assert_eq!("🗻", v.get_unchecked(0..4));
+    assert_eq!("∈", v.get_unchecked(4..7));
+    assert_eq!("🌏", v.get_unchecked(7..11));
 }
-
1.0.0 · source

pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str

👎Deprecated since 1.29.0: use get_unchecked(begin..end) instead

Creates a string slice from another string slice, bypassing safety +

1.0.0 · source

pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str

👎Deprecated since 1.29.0: use get_unchecked(begin..end) instead

Creates a string slice from another string slice, bypassing safety checks.

This is generally not recommended, use with caution! For a safe -alternative see str and Index.

+alternative see str and Index.

This new slice goes from begin to end, including begin but excluding end.

To get a mutable string slice instead, see the -slice_mut_unchecked method.

-
Safety
+slice_mut_unchecked method.

+
§Safety

Callers of this function are responsible that three preconditions are satisfied:

    @@ -131,1059 +130,1113 @@
    Safety
  • begin and end must be byte positions within the string slice.
  • begin and end must lie on UTF-8 sequence boundaries.
-
Examples
-
let s = "Löwe 老虎 Léopard";
+
§Examples
+
let s = "Löwe 老虎 Léopard";
 
 unsafe {
-    assert_eq!("Löwe 老虎 Léopard", s.slice_unchecked(0, 21));
+    assert_eq!("Löwe 老虎 Léopard", s.slice_unchecked(0, 21));
 }
 
-let s = "Hello, world!";
+let s = "Hello, world!";
 
 unsafe {
-    assert_eq!("world", s.slice_unchecked(7, 12));
+    assert_eq!("world", s.slice_unchecked(7, 12));
 }
-
1.4.0 · source

pub fn split_at(&self, mid: usize) -> (&str, &str)

Divide one string slice into two at an index.

+
1.4.0 · source

pub fn split_at(&self, mid: usize) -> (&str, &str)

Divide one string slice into two at an index.

The argument, mid, should be a byte offset from the start of the string. It must also be on the boundary of a UTF-8 code point.

The two slices returned go from the start of the string slice to mid, and from mid to the end of the string slice.

-

To get mutable string slices instead, see the split_at_mut +

To get mutable string slices instead, see the split_at_mut method.

-
Panics
-

Panics if mid is not on a UTF-8 code point boundary, or if it is -past the end of the last code point of the string slice.

-
Examples
-
let s = "Per Martin-Löf";
+
§Panics
+

Panics if mid is not on a UTF-8 code point boundary, or if it is past +the end of the last code point of the string slice. For a non-panicking +alternative see split_at_checked.

+
§Examples
+
let s = "Per Martin-Löf";
 
 let (first, last) = s.split_at(3);
 
-assert_eq!("Per", first);
-assert_eq!(" Martin-Löf", last);
-
1.0.0 · source

pub fn chars(&self) -> Chars<'_>

Returns an iterator over the chars of a string slice.

+assert_eq!("Per", first); +assert_eq!(" Martin-Löf", last);
+
1.80.0 · source

pub fn split_at_checked(&self, mid: usize) -> Option<(&str, &str)>

Divide one string slice into two at an index.

+

The argument, mid, should be a valid byte offset from the start of the +string. It must also be on the boundary of a UTF-8 code point. The +method returns None if that’s not the case.

+

The two slices returned go from the start of the string slice to mid, +and from mid to the end of the string slice.

+

To get mutable string slices instead, see the split_at_mut_checked +method.

+
§Examples
+
let s = "Per Martin-Löf";
+
+let (first, last) = s.split_at_checked(3).unwrap();
+assert_eq!("Per", first);
+assert_eq!(" Martin-Löf", last);
+
+assert_eq!(None, s.split_at_checked(13));  // Inside “ö”
+assert_eq!(None, s.split_at_checked(16));  // Beyond the string length
+
1.0.0 · source

pub fn chars(&self) -> Chars<'_>

Returns an iterator over the chars of a string slice.

As a string slice consists of valid UTF-8, we can iterate through a -string slice by char. This method returns such an iterator.

-

It’s important to remember that char represents a Unicode Scalar +string slice by char. This method returns such an iterator.

+

It’s important to remember that char represents a Unicode Scalar Value, and might not match your idea of what a ‘character’ is. Iteration over grapheme clusters may be what you actually want. This functionality is not provided by Rust’s standard library, check crates.io instead.

-
Examples
+
§Examples

Basic usage:

-
let word = "goodbye";
+
let word = "goodbye";
 
 let count = word.chars().count();
 assert_eq!(7, count);
 
 let mut chars = word.chars();
 
-assert_eq!(Some('g'), chars.next());
-assert_eq!(Some('o'), chars.next());
-assert_eq!(Some('o'), chars.next());
-assert_eq!(Some('d'), chars.next());
-assert_eq!(Some('b'), chars.next());
-assert_eq!(Some('y'), chars.next());
-assert_eq!(Some('e'), chars.next());
+assert_eq!(Some('g'), chars.next());
+assert_eq!(Some('o'), chars.next());
+assert_eq!(Some('o'), chars.next());
+assert_eq!(Some('d'), chars.next());
+assert_eq!(Some('b'), chars.next());
+assert_eq!(Some('y'), chars.next());
+assert_eq!(Some('e'), chars.next());
 
 assert_eq!(None, chars.next());
-

Remember, chars might not match your intuition about characters:

+

Remember, chars might not match your intuition about characters:

-
let y = "y̆";
+
let y = "y̆";
 
 let mut chars = y.chars();
 
-assert_eq!(Some('y'), chars.next()); // not 'y̆'
-assert_eq!(Some('\u{0306}'), chars.next());
+assert_eq!(Some('y'), chars.next()); // not 'y̆'
+assert_eq!(Some('\u{0306}'), chars.next());
 
 assert_eq!(None, chars.next());
-
1.0.0 · source

pub fn char_indices(&self) -> CharIndices<'_>

Returns an iterator over the chars of a string slice, and their +

1.0.0 · source

pub fn char_indices(&self) -> CharIndices<'_>

Returns an iterator over the chars of a string slice, and their positions.

As a string slice consists of valid UTF-8, we can iterate through a -string slice by char. This method returns an iterator of both -these chars, as well as their byte positions.

-

The iterator yields tuples. The position is first, the char is +string slice by char. This method returns an iterator of both +these chars, as well as their byte positions.

+

The iterator yields tuples. The position is first, the char is second.

-
Examples
+
§Examples

Basic usage:

-
let word = "goodbye";
+
let word = "goodbye";
 
 let count = word.char_indices().count();
 assert_eq!(7, count);
 
 let mut char_indices = word.char_indices();
 
-assert_eq!(Some((0, 'g')), char_indices.next());
-assert_eq!(Some((1, 'o')), char_indices.next());
-assert_eq!(Some((2, 'o')), char_indices.next());
-assert_eq!(Some((3, 'd')), char_indices.next());
-assert_eq!(Some((4, 'b')), char_indices.next());
-assert_eq!(Some((5, 'y')), char_indices.next());
-assert_eq!(Some((6, 'e')), char_indices.next());
+assert_eq!(Some((0, 'g')), char_indices.next());
+assert_eq!(Some((1, 'o')), char_indices.next());
+assert_eq!(Some((2, 'o')), char_indices.next());
+assert_eq!(Some((3, 'd')), char_indices.next());
+assert_eq!(Some((4, 'b')), char_indices.next());
+assert_eq!(Some((5, 'y')), char_indices.next());
+assert_eq!(Some((6, 'e')), char_indices.next());
 
 assert_eq!(None, char_indices.next());
-

Remember, chars might not match your intuition about characters:

+

Remember, chars might not match your intuition about characters:

-
let yes = "y̆es";
+
let yes = "y̆es";
 
 let mut char_indices = yes.char_indices();
 
-assert_eq!(Some((0, 'y')), char_indices.next()); // not (0, 'y̆')
-assert_eq!(Some((1, '\u{0306}')), char_indices.next());
+assert_eq!(Some((0, 'y')), char_indices.next()); // not (0, 'y̆')
+assert_eq!(Some((1, '\u{0306}')), char_indices.next());
 
-// note the 3 here - the last character took up two bytes
-assert_eq!(Some((3, 'e')), char_indices.next());
-assert_eq!(Some((4, 's')), char_indices.next());
+// note the 3 here - the previous character took up two bytes
+assert_eq!(Some((3, 'e')), char_indices.next());
+assert_eq!(Some((4, 's')), char_indices.next());
 
 assert_eq!(None, char_indices.next());
-
1.0.0 · source

pub fn bytes(&self) -> Bytes<'_>

An iterator over the bytes of a string slice.

+
1.0.0 · source

pub fn bytes(&self) -> Bytes<'_>

An iterator over the bytes of a string slice.

As a string slice consists of a sequence of bytes, we can iterate through a string slice by byte. This method returns such an iterator.

-
Examples
-
let mut bytes = "bors".bytes();
+
§Examples
+
let mut bytes = "bors".bytes();
 
-assert_eq!(Some(b'b'), bytes.next());
-assert_eq!(Some(b'o'), bytes.next());
-assert_eq!(Some(b'r'), bytes.next());
-assert_eq!(Some(b's'), bytes.next());
+assert_eq!(Some(b'b'), bytes.next());
+assert_eq!(Some(b'o'), bytes.next());
+assert_eq!(Some(b'r'), bytes.next());
+assert_eq!(Some(b's'), bytes.next());
 
 assert_eq!(None, bytes.next());
-
1.1.0 · source

pub fn split_whitespace(&self) -> SplitWhitespace<'_>

Splits a string slice by whitespace.

+
1.1.0 · source

pub fn split_whitespace(&self) -> SplitWhitespace<'_>

Splits a string slice by whitespace.

The iterator returned will return string slices that are sub-slices of the original string slice, separated by any amount of whitespace.

‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space. If you only want to split on ASCII whitespace -instead, use split_ascii_whitespace.

-
Examples
+instead, use split_ascii_whitespace.

+
§Examples

Basic usage:

-
let mut iter = "A few words".split_whitespace();
+
let mut iter = "A few words".split_whitespace();
 
-assert_eq!(Some("A"), iter.next());
-assert_eq!(Some("few"), iter.next());
-assert_eq!(Some("words"), iter.next());
+assert_eq!(Some("A"), iter.next());
+assert_eq!(Some("few"), iter.next());
+assert_eq!(Some("words"), iter.next());
 
 assert_eq!(None, iter.next());

All kinds of whitespace are considered:

-
let mut iter = " Mary   had\ta\u{2009}little  \n\t lamb".split_whitespace();
-assert_eq!(Some("Mary"), iter.next());
-assert_eq!(Some("had"), iter.next());
-assert_eq!(Some("a"), iter.next());
-assert_eq!(Some("little"), iter.next());
-assert_eq!(Some("lamb"), iter.next());
+
let mut iter = " Mary   had\ta\u{2009}little  \n\t lamb".split_whitespace();
+assert_eq!(Some("Mary"), iter.next());
+assert_eq!(Some("had"), iter.next());
+assert_eq!(Some("a"), iter.next());
+assert_eq!(Some("little"), iter.next());
+assert_eq!(Some("lamb"), iter.next());
 
 assert_eq!(None, iter.next());

If the string is empty or all whitespace, the iterator yields no string slices:

-
assert_eq!("".split_whitespace().next(), None);
-assert_eq!("   ".split_whitespace().next(), None);
-
1.34.0 · source

pub fn split_ascii_whitespace(&self) -> SplitAsciiWhitespace<'_>

Splits a string slice by ASCII whitespace.

+
assert_eq!("".split_whitespace().next(), None);
+assert_eq!("   ".split_whitespace().next(), None);
+
1.34.0 · source

pub fn split_ascii_whitespace(&self) -> SplitAsciiWhitespace<'_>

Splits a string slice by ASCII whitespace.

The iterator returned will return string slices that are sub-slices of the original string slice, separated by any amount of ASCII whitespace.

-

To split by Unicode Whitespace instead, use split_whitespace.

-
Examples
+

To split by Unicode Whitespace instead, use split_whitespace.

+
§Examples

Basic usage:

-
let mut iter = "A few words".split_ascii_whitespace();
+
let mut iter = "A few words".split_ascii_whitespace();
 
-assert_eq!(Some("A"), iter.next());
-assert_eq!(Some("few"), iter.next());
-assert_eq!(Some("words"), iter.next());
+assert_eq!(Some("A"), iter.next());
+assert_eq!(Some("few"), iter.next());
+assert_eq!(Some("words"), iter.next());
 
 assert_eq!(None, iter.next());

All kinds of ASCII whitespace are considered:

-
let mut iter = " Mary   had\ta little  \n\t lamb".split_ascii_whitespace();
-assert_eq!(Some("Mary"), iter.next());
-assert_eq!(Some("had"), iter.next());
-assert_eq!(Some("a"), iter.next());
-assert_eq!(Some("little"), iter.next());
-assert_eq!(Some("lamb"), iter.next());
+
let mut iter = " Mary   had\ta little  \n\t lamb".split_ascii_whitespace();
+assert_eq!(Some("Mary"), iter.next());
+assert_eq!(Some("had"), iter.next());
+assert_eq!(Some("a"), iter.next());
+assert_eq!(Some("little"), iter.next());
+assert_eq!(Some("lamb"), iter.next());
 
 assert_eq!(None, iter.next());

If the string is empty or all ASCII whitespace, the iterator yields no string slices:

-
assert_eq!("".split_ascii_whitespace().next(), None);
-assert_eq!("   ".split_ascii_whitespace().next(), None);
-
1.0.0 · source

pub fn lines(&self) -> Lines<'_>

An iterator over the lines of a string, as string slices.

+
assert_eq!("".split_ascii_whitespace().next(), None);
+assert_eq!("   ".split_ascii_whitespace().next(), None);
+
1.0.0 · source

pub fn lines(&self) -> Lines<'_>

An iterator over the lines of a string, as string slices.

Lines are split at line endings that are either newlines (\n) or sequences of a carriage return followed by a line feed (\r\n).

Line terminators are not included in the lines returned by the iterator.

+

Note that any carriage return (\r) not immediately followed by a +line feed (\n) does not split a line. These carriage returns are +thereby included in the produced lines.

The final line ending is optional. A string that ends with a final line ending will return the same lines as an otherwise identical string without a final line ending.

-
Examples
+
§Examples

Basic usage:

-
let text = "foo\r\nbar\n\nbaz\n";
+
let text = "foo\r\nbar\n\nbaz\r";
 let mut lines = text.lines();
 
-assert_eq!(Some("foo"), lines.next());
-assert_eq!(Some("bar"), lines.next());
-assert_eq!(Some(""), lines.next());
-assert_eq!(Some("baz"), lines.next());
+assert_eq!(Some("foo"), lines.next());
+assert_eq!(Some("bar"), lines.next());
+assert_eq!(Some(""), lines.next());
+// Trailing carriage return is included in the last line
+assert_eq!(Some("baz\r"), lines.next());
 
 assert_eq!(None, lines.next());
-

The final line ending isn’t required:

+

The final line does not require any ending:

-
let text = "foo\nbar\n\r\nbaz";
+
let text = "foo\nbar\n\r\nbaz";
 let mut lines = text.lines();
 
-assert_eq!(Some("foo"), lines.next());
-assert_eq!(Some("bar"), lines.next());
-assert_eq!(Some(""), lines.next());
-assert_eq!(Some("baz"), lines.next());
+assert_eq!(Some("foo"), lines.next());
+assert_eq!(Some("bar"), lines.next());
+assert_eq!(Some(""), lines.next());
+assert_eq!(Some("baz"), lines.next());
 
 assert_eq!(None, lines.next());
-
1.0.0 · source

pub fn lines_any(&self) -> LinesAny<'_>

👎Deprecated since 1.4.0: use lines() instead now

An iterator over the lines of a string.

-
1.8.0 · source

pub fn encode_utf16(&self) -> EncodeUtf16<'_>

Returns an iterator of u16 over the string encoded as UTF-16.

-
Examples
-
let text = "Zażółć gęślą jaźń";
+
1.0.0 · source

pub fn lines_any(&self) -> LinesAny<'_>

👎Deprecated since 1.4.0: use lines() instead now

An iterator over the lines of a string.

+
1.8.0 · source

pub fn encode_utf16(&self) -> EncodeUtf16<'_>

Returns an iterator of u16 over the string encoded as UTF-16.

+
§Examples
+
let text = "Zażółć gęślą jaźń";
 
 let utf8_len = text.len();
 let utf16_len = text.encode_utf16().count();
 
 assert!(utf16_len <= utf8_len);
-
1.0.0 · source

pub fn contains<'a, P>(&'a self, pat: P) -> boolwhere - P: Pattern<'a>,

Returns true if the given pattern matches a sub-slice of +

1.0.0 · source

pub fn contains<'a, P>(&'a self, pat: P) -> bool
where + P: Pattern<'a>,

Returns true if the given pattern matches a sub-slice of this string slice.

Returns false if it does not.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Examples
-
let bananas = "bananas";
+
§Examples
+
let bananas = "bananas";
 
-assert!(bananas.contains("nana"));
-assert!(!bananas.contains("apples"));
-
1.0.0 · source

pub fn starts_with<'a, P>(&'a self, pat: P) -> boolwhere - P: Pattern<'a>,

Returns true if the given pattern matches a prefix of this +assert!(bananas.contains("nana")); +assert!(!bananas.contains("apples"));

+
1.0.0 · source

pub fn starts_with<'a, P>(&'a self, pat: P) -> bool
where + P: Pattern<'a>,

Returns true if the given pattern matches a prefix of this string slice.

Returns false if it does not.

-

The pattern can be a &str, char, a slice of chars, or a -function or closure that determines if a character matches.

-
Examples
-
let bananas = "bananas";
-
-assert!(bananas.starts_with("bana"));
-assert!(!bananas.starts_with("nana"));
-
1.0.0 · source

pub fn ends_with<'a, P>(&'a self, pat: P) -> boolwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Returns true if the given pattern matches a suffix of this +

The pattern can be a &str, in which case this function will return true if +the &str is a prefix of this string slice.

+

The pattern can also be a char, a slice of chars, or a +function or closure that determines if a character matches. +These will only be checked against the first character of this string slice. +Look at the second example below regarding behavior for slices of chars.

+
§Examples
+
let bananas = "bananas";
+
+assert!(bananas.starts_with("bana"));
+assert!(!bananas.starts_with("nana"));
+ +
let bananas = "bananas";
+
+// Note that both of these assert successfully.
+assert!(bananas.starts_with(&['b', 'a', 'n', 'a']));
+assert!(bananas.starts_with(&['a', 'b', 'c', 'd']));
+
1.0.0 · source

pub fn ends_with<'a, P>(&'a self, pat: P) -> bool
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Returns true if the given pattern matches a suffix of this string slice.

Returns false if it does not.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Examples
-
let bananas = "bananas";
+
§Examples
+
let bananas = "bananas";
 
-assert!(bananas.ends_with("anas"));
-assert!(!bananas.ends_with("nana"));
-
1.0.0 · source

pub fn find<'a, P>(&'a self, pat: P) -> Option<usize>where - P: Pattern<'a>,

Returns the byte index of the first character of this string slice that +assert!(bananas.ends_with("anas")); +assert!(!bananas.ends_with("nana"));

+
1.0.0 · source

pub fn find<'a, P>(&'a self, pat: P) -> Option<usize>
where + P: Pattern<'a>,

Returns the byte index of the first character of this string slice that matches the pattern.

-

Returns None if the pattern doesn’t match.

-

The pattern can be a &str, char, a slice of chars, or a +

Returns None if the pattern doesn’t match.

+

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Examples
+
§Examples

Simple patterns:

-
let s = "Löwe 老虎 Léopard Gepardi";
+
let s = "Löwe 老虎 Léopard Gepardi";
 
-assert_eq!(s.find('L'), Some(0));
-assert_eq!(s.find('é'), Some(14));
-assert_eq!(s.find("pard"), Some(17));
+assert_eq!(s.find('L'), Some(0)); +assert_eq!(s.find('é'), Some(14)); +assert_eq!(s.find("pard"), Some(17));

More complex patterns using point-free style and closures:

-
let s = "Löwe 老虎 Léopard";
+
let s = "Löwe 老虎 Léopard";
 
 assert_eq!(s.find(char::is_whitespace), Some(5));
 assert_eq!(s.find(char::is_lowercase), Some(1));
 assert_eq!(s.find(|c: char| c.is_whitespace() || c.is_lowercase()), Some(1));
-assert_eq!(s.find(|c: char| (c < 'o') && (c > 'a')), Some(4));
+assert_eq!(s.find(|c: char| (c < 'o') && (c > 'a')), Some(4));

Not finding the pattern:

-
let s = "Löwe 老虎 Léopard";
-let x: &[_] = &['1', '2'];
+
let s = "Löwe 老虎 Léopard";
+let x: &[_] = &['1', '2'];
 
 assert_eq!(s.find(x), None);
-
1.0.0 · source

pub fn rfind<'a, P>(&'a self, pat: P) -> Option<usize>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Returns the byte index for the first character of the last match of the pattern in +

1.0.0 · source

pub fn rfind<'a, P>(&'a self, pat: P) -> Option<usize>
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Returns the byte index for the first character of the last match of the pattern in this string slice.

-

Returns None if the pattern doesn’t match.

-

The pattern can be a &str, char, a slice of chars, or a +

Returns None if the pattern doesn’t match.

+

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Examples
+
§Examples

Simple patterns:

-
let s = "Löwe 老虎 Léopard Gepardi";
+
let s = "Löwe 老虎 Léopard Gepardi";
 
-assert_eq!(s.rfind('L'), Some(13));
-assert_eq!(s.rfind('é'), Some(14));
-assert_eq!(s.rfind("pard"), Some(24));
+assert_eq!(s.rfind('L'), Some(13)); +assert_eq!(s.rfind('é'), Some(14)); +assert_eq!(s.rfind("pard"), Some(24));

More complex patterns with closures:

-
let s = "Löwe 老虎 Léopard";
+
let s = "Löwe 老虎 Léopard";
 
 assert_eq!(s.rfind(char::is_whitespace), Some(12));
 assert_eq!(s.rfind(char::is_lowercase), Some(20));

Not finding the pattern:

-
let s = "Löwe 老虎 Léopard";
-let x: &[_] = &['1', '2'];
+
let s = "Löwe 老虎 Léopard";
+let x: &[_] = &['1', '2'];
 
 assert_eq!(s.rfind(x), None);
-
1.0.0 · source

pub fn split<'a, P>(&'a self, pat: P) -> Split<'a, P>where - P: Pattern<'a>,

An iterator over substrings of this string slice, separated by +

1.0.0 · source

pub fn split<'a, P>(&'a self, pat: P) -> Split<'a, P>
where + P: Pattern<'a>,

An iterator over substrings of this string slice, separated by characters matched by a pattern.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Iterator behavior
-

The returned iterator will be a DoubleEndedIterator if the pattern +

§Iterator behavior
+

The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

+elements. This is true for, e.g., char, but not for &str.

If the pattern allows a reverse search but its results might differ -from a forward search, the rsplit method can be used.

-
Examples
+from a forward search, the rsplit method can be used.

+
§Examples

Simple patterns:

-
let v: Vec<&str> = "Mary had a little lamb".split(' ').collect();
-assert_eq!(v, ["Mary", "had", "a", "little", "lamb"]);
+
let v: Vec<&str> = "Mary had a little lamb".split(' ').collect();
+assert_eq!(v, ["Mary", "had", "a", "little", "lamb"]);
 
-let v: Vec<&str> = "".split('X').collect();
-assert_eq!(v, [""]);
+let v: Vec<&str> = "".split('X').collect();
+assert_eq!(v, [""]);
 
-let v: Vec<&str> = "lionXXtigerXleopard".split('X').collect();
-assert_eq!(v, ["lion", "", "tiger", "leopard"]);
+let v: Vec<&str> = "lionXXtigerXleopard".split('X').collect();
+assert_eq!(v, ["lion", "", "tiger", "leopard"]);
 
-let v: Vec<&str> = "lion::tiger::leopard".split("::").collect();
-assert_eq!(v, ["lion", "tiger", "leopard"]);
+let v: Vec<&str> = "lion::tiger::leopard".split("::").collect();
+assert_eq!(v, ["lion", "tiger", "leopard"]);
 
-let v: Vec<&str> = "abc1def2ghi".split(char::is_numeric).collect();
-assert_eq!(v, ["abc", "def", "ghi"]);
+let v: Vec<&str> = "abc1def2ghi".split(char::is_numeric).collect();
+assert_eq!(v, ["abc", "def", "ghi"]);
 
-let v: Vec<&str> = "lionXtigerXleopard".split(char::is_uppercase).collect();
-assert_eq!(v, ["lion", "tiger", "leopard"]);
+let v: Vec<&str> = "lionXtigerXleopard".split(char::is_uppercase).collect(); +assert_eq!(v, ["lion", "tiger", "leopard"]);

If the pattern is a slice of chars, split on each occurrence of any of the characters:

-
let v: Vec<&str> = "2020-11-03 23:59".split(&['-', ' ', ':', '@'][..]).collect();
-assert_eq!(v, ["2020", "11", "03", "23", "59"]);
+
let v: Vec<&str> = "2020-11-03 23:59".split(&['-', ' ', ':', '@'][..]).collect();
+assert_eq!(v, ["2020", "11", "03", "23", "59"]);

A more complex pattern, using a closure:

-
let v: Vec<&str> = "abc1defXghi".split(|c| c == '1' || c == 'X').collect();
-assert_eq!(v, ["abc", "def", "ghi"]);
+
let v: Vec<&str> = "abc1defXghi".split(|c| c == '1' || c == 'X').collect();
+assert_eq!(v, ["abc", "def", "ghi"]);

If a string contains multiple contiguous separators, you will end up with empty strings in the output:

-
let x = "||||a||b|c".to_string();
-let d: Vec<_> = x.split('|').collect();
+
let x = "||||a||b|c".to_string();
+let d: Vec<_> = x.split('|').collect();
 
-assert_eq!(d, &["", "", "", "", "a", "", "b", "c"]);
+assert_eq!(d, &["", "", "", "", "a", "", "b", "c"]);

Contiguous separators are separated by the empty string.

-
let x = "(///)".to_string();
-let d: Vec<_> = x.split('/').collect();
+
let x = "(///)".to_string();
+let d: Vec<_> = x.split('/').collect();
 
-assert_eq!(d, &["(", "", "", ")"]);
+assert_eq!(d, &["(", "", "", ")"]);

Separators at the start or end of a string are neighbored by empty strings.

-
let d: Vec<_> = "010".split("0").collect();
-assert_eq!(d, &["", "1", ""]);
+
let d: Vec<_> = "010".split("0").collect();
+assert_eq!(d, &["", "1", ""]);

When the empty string is used as a separator, it separates every character in the string, along with the beginning and end of the string.

-
let f: Vec<_> = "rust".split("").collect();
-assert_eq!(f, &["", "r", "u", "s", "t", ""]);
+
let f: Vec<_> = "rust".split("").collect();
+assert_eq!(f, &["", "r", "u", "s", "t", ""]);

Contiguous separators can lead to possibly surprising behavior when whitespace is used as the separator. This code is correct:

-
let x = "    a  b c".to_string();
-let d: Vec<_> = x.split(' ').collect();
+
let x = "    a  b c".to_string();
+let d: Vec<_> = x.split(' ').collect();
 
-assert_eq!(d, &["", "", "", "", "a", "", "b", "c"]);
+assert_eq!(d, &["", "", "", "", "a", "", "b", "c"]);

It does not give you:

-
assert_eq!(d, &["a", "b", "c"]);
-

Use split_whitespace for this behavior.

-
1.51.0 · source

pub fn split_inclusive<'a, P>(&'a self, pat: P) -> SplitInclusive<'a, P>where - P: Pattern<'a>,

An iterator over substrings of this string slice, separated by +

assert_eq!(d, &["a", "b", "c"]);
+

Use split_whitespace for this behavior.

+
1.51.0 · source

pub fn split_inclusive<'a, P>(&'a self, pat: P) -> SplitInclusive<'a, P>
where + P: Pattern<'a>,

An iterator over substrings of this string slice, separated by characters matched by a pattern. Differs from the iterator produced by split in that split_inclusive leaves the matched part as the terminator of the substring.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Examples
-
let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb."
-    .split_inclusive('\n').collect();
-assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb."]);
+
§Examples
+
let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb."
+    .split_inclusive('\n').collect();
+assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb."]);

If the last element of the string is matched, that element will be considered the terminator of the preceding substring. That substring will be the last item returned by the iterator.

-
let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb.\n"
-    .split_inclusive('\n').collect();
-assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb.\n"]);
-
1.0.0 · source

pub fn rsplit<'a, P>(&'a self, pat: P) -> RSplit<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over substrings of the given string slice, separated by +

let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb.\n"
+    .split_inclusive('\n').collect();
+assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb.\n"]);
+
1.0.0 · source

pub fn rsplit<'a, P>(&'a self, pat: P) -> RSplit<'a, P>
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over substrings of the given string slice, separated by characters matched by a pattern and yielded in reverse order.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Iterator behavior
+
§Iterator behavior

The returned iterator requires that the pattern supports a reverse -search, and it will be a DoubleEndedIterator if a forward/reverse +search, and it will be a DoubleEndedIterator if a forward/reverse search yields the same elements.

-

For iterating from the front, the split method can be used.

-
Examples
+

For iterating from the front, the split method can be used.

+
§Examples

Simple patterns:

-
let v: Vec<&str> = "Mary had a little lamb".rsplit(' ').collect();
-assert_eq!(v, ["lamb", "little", "a", "had", "Mary"]);
+
let v: Vec<&str> = "Mary had a little lamb".rsplit(' ').collect();
+assert_eq!(v, ["lamb", "little", "a", "had", "Mary"]);
 
-let v: Vec<&str> = "".rsplit('X').collect();
-assert_eq!(v, [""]);
+let v: Vec<&str> = "".rsplit('X').collect();
+assert_eq!(v, [""]);
 
-let v: Vec<&str> = "lionXXtigerXleopard".rsplit('X').collect();
-assert_eq!(v, ["leopard", "tiger", "", "lion"]);
+let v: Vec<&str> = "lionXXtigerXleopard".rsplit('X').collect();
+assert_eq!(v, ["leopard", "tiger", "", "lion"]);
 
-let v: Vec<&str> = "lion::tiger::leopard".rsplit("::").collect();
-assert_eq!(v, ["leopard", "tiger", "lion"]);
+let v: Vec<&str> = "lion::tiger::leopard".rsplit("::").collect(); +assert_eq!(v, ["leopard", "tiger", "lion"]);

A more complex pattern, using a closure:

-
let v: Vec<&str> = "abc1defXghi".rsplit(|c| c == '1' || c == 'X').collect();
-assert_eq!(v, ["ghi", "def", "abc"]);
-
1.0.0 · source

pub fn split_terminator<'a, P>(&'a self, pat: P) -> SplitTerminator<'a, P>where - P: Pattern<'a>,

An iterator over substrings of the given string slice, separated by +

let v: Vec<&str> = "abc1defXghi".rsplit(|c| c == '1' || c == 'X').collect();
+assert_eq!(v, ["ghi", "def", "abc"]);
+
1.0.0 · source

pub fn split_terminator<'a, P>(&'a self, pat: P) -> SplitTerminator<'a, P>
where + P: Pattern<'a>,

An iterator over substrings of the given string slice, separated by characters matched by a pattern.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-

Equivalent to split, except that the trailing substring +

Equivalent to split, except that the trailing substring is skipped if empty.

This method can be used for string data that is terminated, rather than separated by a pattern.

-
Iterator behavior
-

The returned iterator will be a DoubleEndedIterator if the pattern +

§Iterator behavior
+

The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

+elements. This is true for, e.g., char, but not for &str.

If the pattern allows a reverse search but its results might differ -from a forward search, the rsplit_terminator method can be used.

-
Examples
-
let v: Vec<&str> = "A.B.".split_terminator('.').collect();
-assert_eq!(v, ["A", "B"]);
-
-let v: Vec<&str> = "A..B..".split_terminator(".").collect();
-assert_eq!(v, ["A", "", "B", ""]);
-
-let v: Vec<&str> = "A.B:C.D".split_terminator(&['.', ':'][..]).collect();
-assert_eq!(v, ["A", "B", "C", "D"]);
-
1.0.0 · source

pub fn rsplit_terminator<'a, P>(&'a self, pat: P) -> RSplitTerminator<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over substrings of self, separated by characters +from a forward search, the rsplit_terminator method can be used.

+
§Examples
+
let v: Vec<&str> = "A.B.".split_terminator('.').collect();
+assert_eq!(v, ["A", "B"]);
+
+let v: Vec<&str> = "A..B..".split_terminator(".").collect();
+assert_eq!(v, ["A", "", "B", ""]);
+
+let v: Vec<&str> = "A.B:C.D".split_terminator(&['.', ':'][..]).collect();
+assert_eq!(v, ["A", "B", "C", "D"]);
+
1.0.0 · source

pub fn rsplit_terminator<'a, P>(&'a self, pat: P) -> RSplitTerminator<'a, P>
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over substrings of self, separated by characters matched by a pattern and yielded in reverse order.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-

Equivalent to split, except that the trailing substring is +

Equivalent to split, except that the trailing substring is skipped if empty.

This method can be used for string data that is terminated, rather than separated by a pattern.

-
Iterator behavior
+
§Iterator behavior

The returned iterator requires that the pattern supports a reverse search, and it will be double ended if a forward/reverse search yields the same elements.

-

For iterating from the front, the split_terminator method can be +

For iterating from the front, the split_terminator method can be used.

-
Examples
-
let v: Vec<&str> = "A.B.".rsplit_terminator('.').collect();
-assert_eq!(v, ["B", "A"]);
+
§Examples
+
let v: Vec<&str> = "A.B.".rsplit_terminator('.').collect();
+assert_eq!(v, ["B", "A"]);
 
-let v: Vec<&str> = "A..B..".rsplit_terminator(".").collect();
-assert_eq!(v, ["", "B", "", "A"]);
+let v: Vec<&str> = "A..B..".rsplit_terminator(".").collect();
+assert_eq!(v, ["", "B", "", "A"]);
 
-let v: Vec<&str> = "A.B:C.D".rsplit_terminator(&['.', ':'][..]).collect();
-assert_eq!(v, ["D", "C", "B", "A"]);
-
1.0.0 · source

pub fn splitn<'a, P>(&'a self, n: usize, pat: P) -> SplitN<'a, P>where - P: Pattern<'a>,

An iterator over substrings of the given string slice, separated by a +let v: Vec<&str> = "A.B:C.D".rsplit_terminator(&['.', ':'][..]).collect(); +assert_eq!(v, ["D", "C", "B", "A"]);

+
1.0.0 · source

pub fn splitn<'a, P>(&'a self, n: usize, pat: P) -> SplitN<'a, P>
where + P: Pattern<'a>,

An iterator over substrings of the given string slice, separated by a pattern, restricted to returning at most n items.

If n substrings are returned, the last substring (the nth substring) will contain the remainder of the string.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Iterator behavior
+
§Iterator behavior

The returned iterator will not be double ended, because it is not efficient to support.

-

If the pattern allows a reverse search, the rsplitn method can be +

If the pattern allows a reverse search, the rsplitn method can be used.

-
Examples
+
§Examples

Simple patterns:

-
let v: Vec<&str> = "Mary had a little lambda".splitn(3, ' ').collect();
-assert_eq!(v, ["Mary", "had", "a little lambda"]);
+
let v: Vec<&str> = "Mary had a little lambda".splitn(3, ' ').collect();
+assert_eq!(v, ["Mary", "had", "a little lambda"]);
 
-let v: Vec<&str> = "lionXXtigerXleopard".splitn(3, "X").collect();
-assert_eq!(v, ["lion", "", "tigerXleopard"]);
+let v: Vec<&str> = "lionXXtigerXleopard".splitn(3, "X").collect();
+assert_eq!(v, ["lion", "", "tigerXleopard"]);
 
-let v: Vec<&str> = "abcXdef".splitn(1, 'X').collect();
-assert_eq!(v, ["abcXdef"]);
+let v: Vec<&str> = "abcXdef".splitn(1, 'X').collect();
+assert_eq!(v, ["abcXdef"]);
 
-let v: Vec<&str> = "".splitn(1, 'X').collect();
-assert_eq!(v, [""]);
+let v: Vec<&str> = "".splitn(1, 'X').collect(); +assert_eq!(v, [""]);

A more complex pattern, using a closure:

-
let v: Vec<&str> = "abc1defXghi".splitn(2, |c| c == '1' || c == 'X').collect();
-assert_eq!(v, ["abc", "defXghi"]);
-
1.0.0 · source

pub fn rsplitn<'a, P>(&'a self, n: usize, pat: P) -> RSplitN<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over substrings of this string slice, separated by a +

let v: Vec<&str> = "abc1defXghi".splitn(2, |c| c == '1' || c == 'X').collect();
+assert_eq!(v, ["abc", "defXghi"]);
+
1.0.0 · source

pub fn rsplitn<'a, P>(&'a self, n: usize, pat: P) -> RSplitN<'a, P>
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over substrings of this string slice, separated by a pattern, starting from the end of the string, restricted to returning at most n items.

If n substrings are returned, the last substring (the nth substring) will contain the remainder of the string.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Iterator behavior
+
§Iterator behavior

The returned iterator will not be double ended, because it is not efficient to support.

-

For splitting from the front, the splitn method can be used.

-
Examples
+

For splitting from the front, the splitn method can be used.

+
§Examples

Simple patterns:

-
let v: Vec<&str> = "Mary had a little lamb".rsplitn(3, ' ').collect();
-assert_eq!(v, ["lamb", "little", "Mary had a"]);
+
let v: Vec<&str> = "Mary had a little lamb".rsplitn(3, ' ').collect();
+assert_eq!(v, ["lamb", "little", "Mary had a"]);
 
-let v: Vec<&str> = "lionXXtigerXleopard".rsplitn(3, 'X').collect();
-assert_eq!(v, ["leopard", "tiger", "lionX"]);
+let v: Vec<&str> = "lionXXtigerXleopard".rsplitn(3, 'X').collect();
+assert_eq!(v, ["leopard", "tiger", "lionX"]);
 
-let v: Vec<&str> = "lion::tiger::leopard".rsplitn(2, "::").collect();
-assert_eq!(v, ["leopard", "lion::tiger"]);
+let v: Vec<&str> = "lion::tiger::leopard".rsplitn(2, "::").collect(); +assert_eq!(v, ["leopard", "lion::tiger"]);

A more complex pattern, using a closure:

-
let v: Vec<&str> = "abc1defXghi".rsplitn(2, |c| c == '1' || c == 'X').collect();
-assert_eq!(v, ["ghi", "abc1def"]);
-
1.52.0 · source

pub fn split_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where - P: Pattern<'a>,

Splits the string on the first occurrence of the specified delimiter and +

let v: Vec<&str> = "abc1defXghi".rsplitn(2, |c| c == '1' || c == 'X').collect();
+assert_eq!(v, ["ghi", "abc1def"]);
+
1.52.0 · source

pub fn split_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>
where + P: Pattern<'a>,

Splits the string on the first occurrence of the specified delimiter and returns prefix before delimiter and suffix after delimiter.

-
Examples
-
assert_eq!("cfg".split_once('='), None);
-assert_eq!("cfg=".split_once('='), Some(("cfg", "")));
-assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo")));
-assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar")));
-
1.52.0 · source

pub fn rsplit_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Splits the string on the last occurrence of the specified delimiter and +

§Examples
+
assert_eq!("cfg".split_once('='), None);
+assert_eq!("cfg=".split_once('='), Some(("cfg", "")));
+assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo")));
+assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar")));
+
1.52.0 · source

pub fn rsplit_once<'a, P>(&'a self, delimiter: P) -> Option<(&'a str, &'a str)>
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Splits the string on the last occurrence of the specified delimiter and returns prefix before delimiter and suffix after delimiter.

-
Examples
-
assert_eq!("cfg".rsplit_once('='), None);
-assert_eq!("cfg=foo".rsplit_once('='), Some(("cfg", "foo")));
-assert_eq!("cfg=foo=bar".rsplit_once('='), Some(("cfg=foo", "bar")));
-
1.2.0 · source

pub fn matches<'a, P>(&'a self, pat: P) -> Matches<'a, P>where - P: Pattern<'a>,

An iterator over the disjoint matches of a pattern within the given string +

§Examples
+
assert_eq!("cfg".rsplit_once('='), None);
+assert_eq!("cfg=foo".rsplit_once('='), Some(("cfg", "foo")));
+assert_eq!("cfg=foo=bar".rsplit_once('='), Some(("cfg=foo", "bar")));
+
1.2.0 · source

pub fn matches<'a, P>(&'a self, pat: P) -> Matches<'a, P>
where + P: Pattern<'a>,

An iterator over the disjoint matches of a pattern within the given string slice.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Iterator behavior
-

The returned iterator will be a DoubleEndedIterator if the pattern +

§Iterator behavior
+

The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

+elements. This is true for, e.g., char, but not for &str.

If the pattern allows a reverse search but its results might differ -from a forward search, the rmatches method can be used.

-
Examples
-
let v: Vec<&str> = "abcXXXabcYYYabc".matches("abc").collect();
-assert_eq!(v, ["abc", "abc", "abc"]);
-
-let v: Vec<&str> = "1abc2abc3".matches(char::is_numeric).collect();
-assert_eq!(v, ["1", "2", "3"]);
-
1.2.0 · source

pub fn rmatches<'a, P>(&'a self, pat: P) -> RMatches<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over the disjoint matches of a pattern within this string slice, +from a forward search, the rmatches method can be used.

+
§Examples
+
let v: Vec<&str> = "abcXXXabcYYYabc".matches("abc").collect();
+assert_eq!(v, ["abc", "abc", "abc"]);
+
+let v: Vec<&str> = "1abc2abc3".matches(char::is_numeric).collect();
+assert_eq!(v, ["1", "2", "3"]);
+
1.2.0 · source

pub fn rmatches<'a, P>(&'a self, pat: P) -> RMatches<'a, P>
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over the disjoint matches of a pattern within this string slice, yielded in reverse order.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Iterator behavior
+
§Iterator behavior

The returned iterator requires that the pattern supports a reverse -search, and it will be a DoubleEndedIterator if a forward/reverse +search, and it will be a DoubleEndedIterator if a forward/reverse search yields the same elements.

-

For iterating from the front, the matches method can be used.

-
Examples
-
let v: Vec<&str> = "abcXXXabcYYYabc".rmatches("abc").collect();
-assert_eq!(v, ["abc", "abc", "abc"]);
-
-let v: Vec<&str> = "1abc2abc3".rmatches(char::is_numeric).collect();
-assert_eq!(v, ["3", "2", "1"]);
-
1.5.0 · source

pub fn match_indices<'a, P>(&'a self, pat: P) -> MatchIndices<'a, P>where - P: Pattern<'a>,

An iterator over the disjoint matches of a pattern within this string +

For iterating from the front, the matches method can be used.

+
§Examples
+
let v: Vec<&str> = "abcXXXabcYYYabc".rmatches("abc").collect();
+assert_eq!(v, ["abc", "abc", "abc"]);
+
+let v: Vec<&str> = "1abc2abc3".rmatches(char::is_numeric).collect();
+assert_eq!(v, ["3", "2", "1"]);
+
1.5.0 · source

pub fn match_indices<'a, P>(&'a self, pat: P) -> MatchIndices<'a, P>
where + P: Pattern<'a>,

An iterator over the disjoint matches of a pattern within this string slice as well as the index that the match starts at.

For matches of pat within self that overlap, only the indices corresponding to the first match are returned.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Iterator behavior
-

The returned iterator will be a DoubleEndedIterator if the pattern +

§Iterator behavior
+

The returned iterator will be a DoubleEndedIterator if the pattern allows a reverse search and forward/reverse search yields the same -elements. This is true for, e.g., char, but not for &str.

+elements. This is true for, e.g., char, but not for &str.

If the pattern allows a reverse search but its results might differ -from a forward search, the rmatch_indices method can be used.

-
Examples
-
let v: Vec<_> = "abcXXXabcYYYabc".match_indices("abc").collect();
-assert_eq!(v, [(0, "abc"), (6, "abc"), (12, "abc")]);
-
-let v: Vec<_> = "1abcabc2".match_indices("abc").collect();
-assert_eq!(v, [(1, "abc"), (4, "abc")]);
-
-let v: Vec<_> = "ababa".match_indices("aba").collect();
-assert_eq!(v, [(0, "aba")]); // only the first `aba`
-
1.5.0 · source

pub fn rmatch_indices<'a, P>(&'a self, pat: P) -> RMatchIndices<'a, P>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over the disjoint matches of a pattern within self, +from a forward search, the rmatch_indices method can be used.

+
§Examples
+
let v: Vec<_> = "abcXXXabcYYYabc".match_indices("abc").collect();
+assert_eq!(v, [(0, "abc"), (6, "abc"), (12, "abc")]);
+
+let v: Vec<_> = "1abcabc2".match_indices("abc").collect();
+assert_eq!(v, [(1, "abc"), (4, "abc")]);
+
+let v: Vec<_> = "ababa".match_indices("aba").collect();
+assert_eq!(v, [(0, "aba")]); // only the first `aba`
+
1.5.0 · source

pub fn rmatch_indices<'a, P>(&'a self, pat: P) -> RMatchIndices<'a, P>
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

An iterator over the disjoint matches of a pattern within self, yielded in reverse order along with the index of the match.

For matches of pat within self that overlap, only the indices corresponding to the last match are returned.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Iterator behavior
+
§Iterator behavior

The returned iterator requires that the pattern supports a reverse -search, and it will be a DoubleEndedIterator if a forward/reverse +search, and it will be a DoubleEndedIterator if a forward/reverse search yields the same elements.

-

For iterating from the front, the match_indices method can be used.

-
Examples
-
let v: Vec<_> = "abcXXXabcYYYabc".rmatch_indices("abc").collect();
-assert_eq!(v, [(12, "abc"), (6, "abc"), (0, "abc")]);
+

For iterating from the front, the match_indices method can be used.

+
§Examples
+
let v: Vec<_> = "abcXXXabcYYYabc".rmatch_indices("abc").collect();
+assert_eq!(v, [(12, "abc"), (6, "abc"), (0, "abc")]);
 
-let v: Vec<_> = "1abcabc2".rmatch_indices("abc").collect();
-assert_eq!(v, [(4, "abc"), (1, "abc")]);
+let v: Vec<_> = "1abcabc2".rmatch_indices("abc").collect();
+assert_eq!(v, [(4, "abc"), (1, "abc")]);
 
-let v: Vec<_> = "ababa".rmatch_indices("aba").collect();
-assert_eq!(v, [(2, "aba")]); // only the last `aba`
-
1.0.0 · source

pub fn trim(&self) -> &str

Returns a string slice with leading and trailing whitespace removed.

+let v: Vec<_> = "ababa".rmatch_indices("aba").collect(); +assert_eq!(v, [(2, "aba")]); // only the last `aba`
+
1.0.0 · source

pub fn trim(&self) -> &str

Returns a string slice with leading and trailing whitespace removed.

‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

-
Examples
-
let s = "\n Hello\tworld\t\n";
+
§Examples
+
let s = "\n Hello\tworld\t\n";
 
-assert_eq!("Hello\tworld", s.trim());
-
1.30.0 · source

pub fn trim_start(&self) -> &str

Returns a string slice with leading whitespace removed.

+assert_eq!("Hello\tworld", s.trim());
+
1.30.0 · source

pub fn trim_start(&self) -> &str

Returns a string slice with leading whitespace removed.

‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

-
Text directionality
+
§Text directionality

A string is a sequence of bytes. start in this context means the first position of that byte string; for a left-to-right language like English or Russian, this will be left side, and for right-to-left languages like Arabic or Hebrew, this will be the right side.

-
Examples
+
§Examples

Basic usage:

-
let s = "\n Hello\tworld\t\n";
-assert_eq!("Hello\tworld\t\n", s.trim_start());
+
let s = "\n Hello\tworld\t\n";
+assert_eq!("Hello\tworld\t\n", s.trim_start());

Directionality:

-
let s = "  English  ";
-assert!(Some('E') == s.trim_start().chars().next());
+
let s = "  English  ";
+assert!(Some('E') == s.trim_start().chars().next());
 
-let s = "  עברית  ";
-assert!(Some('ע') == s.trim_start().chars().next());
-
1.30.0 · source

pub fn trim_end(&self) -> &str

Returns a string slice with trailing whitespace removed.

+let s = " עברית "; +assert!(Some('ע') == s.trim_start().chars().next());
+
1.30.0 · source

pub fn trim_end(&self) -> &str

Returns a string slice with trailing whitespace removed.

‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space, which includes newlines.

-
Text directionality
+
§Text directionality

A string is a sequence of bytes. end in this context means the last position of that byte string; for a left-to-right language like English or Russian, this will be right side, and for right-to-left languages like Arabic or Hebrew, this will be the left side.

-
Examples
+
§Examples

Basic usage:

-
let s = "\n Hello\tworld\t\n";
-assert_eq!("\n Hello\tworld", s.trim_end());
+
let s = "\n Hello\tworld\t\n";
+assert_eq!("\n Hello\tworld", s.trim_end());

Directionality:

-
let s = "  English  ";
-assert!(Some('h') == s.trim_end().chars().rev().next());
+
let s = "  English  ";
+assert!(Some('h') == s.trim_end().chars().rev().next());
 
-let s = "  עברית  ";
-assert!(Some('ת') == s.trim_end().chars().rev().next());
-
1.0.0 · source

pub fn trim_left(&self) -> &str

👎Deprecated since 1.33.0: superseded by trim_start

Returns a string slice with leading whitespace removed.

+let s = " עברית "; +assert!(Some('ת') == s.trim_end().chars().rev().next());
+
1.0.0 · source

pub fn trim_left(&self) -> &str

👎Deprecated since 1.33.0: superseded by trim_start

Returns a string slice with leading whitespace removed.

‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space.

-
Text directionality
+
§Text directionality

A string is a sequence of bytes. ‘Left’ in this context means the first position of that byte string; for a language like Arabic or Hebrew which are ‘right to left’ rather than ‘left to right’, this will be the right side, not the left.

-
Examples
+
§Examples

Basic usage:

-
let s = " Hello\tworld\t";
+
let s = " Hello\tworld\t";
 
-assert_eq!("Hello\tworld\t", s.trim_left());
+assert_eq!("Hello\tworld\t", s.trim_left());

Directionality:

-
let s = "  English";
-assert!(Some('E') == s.trim_left().chars().next());
+
let s = "  English";
+assert!(Some('E') == s.trim_left().chars().next());
 
-let s = "  עברית";
-assert!(Some('ע') == s.trim_left().chars().next());
-
1.0.0 · source

pub fn trim_right(&self) -> &str

👎Deprecated since 1.33.0: superseded by trim_end

Returns a string slice with trailing whitespace removed.

+let s = " עברית"; +assert!(Some('ע') == s.trim_left().chars().next());
+
1.0.0 · source

pub fn trim_right(&self) -> &str

👎Deprecated since 1.33.0: superseded by trim_end

Returns a string slice with trailing whitespace removed.

‘Whitespace’ is defined according to the terms of the Unicode Derived Core Property White_Space.

-
Text directionality
+
§Text directionality

A string is a sequence of bytes. ‘Right’ in this context means the last position of that byte string; for a language like Arabic or Hebrew which are ‘right to left’ rather than ‘left to right’, this will be the left side, not the right.

-
Examples
+
§Examples

Basic usage:

-
let s = " Hello\tworld\t";
+
let s = " Hello\tworld\t";
 
-assert_eq!(" Hello\tworld", s.trim_right());
+assert_eq!(" Hello\tworld", s.trim_right());

Directionality:

-
let s = "English  ";
-assert!(Some('h') == s.trim_right().chars().rev().next());
+
let s = "English  ";
+assert!(Some('h') == s.trim_right().chars().rev().next());
 
-let s = "עברית  ";
-assert!(Some('ת') == s.trim_right().chars().rev().next());
-
1.0.0 · source

pub fn trim_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: DoubleEndedSearcher<'a>,

Returns a string slice with all prefixes and suffixes that match a +let s = "עברית "; +assert!(Some('ת') == s.trim_right().chars().rev().next());

+
1.0.0 · source

pub fn trim_matches<'a, P>(&'a self, pat: P) -> &'a str
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: DoubleEndedSearcher<'a>,

Returns a string slice with all prefixes and suffixes that match a pattern repeatedly removed.

-

The pattern can be a char, a slice of chars, or a function +

The pattern can be a char, a slice of chars, or a function or closure that determines if a character matches.

-
Examples
+
§Examples

Simple patterns:

-
assert_eq!("11foo1bar11".trim_matches('1'), "foo1bar");
-assert_eq!("123foo1bar123".trim_matches(char::is_numeric), "foo1bar");
+
assert_eq!("11foo1bar11".trim_matches('1'), "foo1bar");
+assert_eq!("123foo1bar123".trim_matches(char::is_numeric), "foo1bar");
 
-let x: &[_] = &['1', '2'];
-assert_eq!("12foo1bar12".trim_matches(x), "foo1bar");
+let x: &[_] = &['1', '2']; +assert_eq!("12foo1bar12".trim_matches(x), "foo1bar");

A more complex pattern, using a closure:

-
assert_eq!("1foo1barXX".trim_matches(|c| c == '1' || c == 'X'), "foo1bar");
-
1.30.0 · source

pub fn trim_start_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>,

Returns a string slice with all prefixes that match a pattern +

assert_eq!("1foo1barXX".trim_matches(|c| c == '1' || c == 'X'), "foo1bar");
+
1.30.0 · source

pub fn trim_start_matches<'a, P>(&'a self, pat: P) -> &'a str
where + P: Pattern<'a>,

Returns a string slice with all prefixes that match a pattern repeatedly removed.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Text directionality
+
§Text directionality

A string is a sequence of bytes. start in this context means the first position of that byte string; for a left-to-right language like English or Russian, this will be left side, and for right-to-left languages like Arabic or Hebrew, this will be the right side.

-
Examples
-
assert_eq!("11foo1bar11".trim_start_matches('1'), "foo1bar11");
-assert_eq!("123foo1bar123".trim_start_matches(char::is_numeric), "foo1bar123");
-
-let x: &[_] = &['1', '2'];
-assert_eq!("12foo1bar12".trim_start_matches(x), "foo1bar12");
-
1.45.0 · source

pub fn strip_prefix<'a, P>(&'a self, prefix: P) -> Option<&'a str>where - P: Pattern<'a>,

Returns a string slice with the prefix removed.

-

If the string starts with the pattern prefix, returns substring after the prefix, wrapped -in Some. Unlike trim_start_matches, this method removes the prefix exactly once.

+
§Examples
+
assert_eq!("11foo1bar11".trim_start_matches('1'), "foo1bar11");
+assert_eq!("123foo1bar123".trim_start_matches(char::is_numeric), "foo1bar123");
+
+let x: &[_] = &['1', '2'];
+assert_eq!("12foo1bar12".trim_start_matches(x), "foo1bar12");
+
1.45.0 · source

pub fn strip_prefix<'a, P>(&'a self, prefix: P) -> Option<&'a str>
where + P: Pattern<'a>,

Returns a string slice with the prefix removed.

+

If the string starts with the pattern prefix, returns the substring after the prefix, +wrapped in Some. Unlike trim_start_matches, this method removes the prefix exactly once.

If the string does not start with prefix, returns None.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Examples
-
assert_eq!("foo:bar".strip_prefix("foo:"), Some("bar"));
-assert_eq!("foo:bar".strip_prefix("bar"), None);
-assert_eq!("foofoo".strip_prefix("foo"), Some("foo"));
-
1.45.0 · source

pub fn strip_suffix<'a, P>(&'a self, suffix: P) -> Option<&'a str>where - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Returns a string slice with the suffix removed.

+
§Examples
+
assert_eq!("foo:bar".strip_prefix("foo:"), Some("bar"));
+assert_eq!("foo:bar".strip_prefix("bar"), None);
+assert_eq!("foofoo".strip_prefix("foo"), Some("foo"));
+
1.45.0 · source

pub fn strip_suffix<'a, P>(&'a self, suffix: P) -> Option<&'a str>
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Returns a string slice with the suffix removed.

If the string ends with the pattern suffix, returns the substring before the suffix, wrapped in Some. Unlike trim_end_matches, this method removes the suffix exactly once.

If the string does not end with suffix, returns None.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Examples
-
assert_eq!("bar:foo".strip_suffix(":foo"), Some("bar"));
-assert_eq!("bar:foo".strip_suffix("bar"), None);
-assert_eq!("foofoo".strip_suffix("foo"), Some("foo"));
-
1.30.0 · source

pub fn trim_end_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Returns a string slice with all suffixes that match a pattern +

§Examples
+
assert_eq!("bar:foo".strip_suffix(":foo"), Some("bar"));
+assert_eq!("bar:foo".strip_suffix("bar"), None);
+assert_eq!("foofoo".strip_suffix("foo"), Some("foo"));
+
1.30.0 · source

pub fn trim_end_matches<'a, P>(&'a self, pat: P) -> &'a str
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

Returns a string slice with all suffixes that match a pattern repeatedly removed.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Text directionality
+
§Text directionality

A string is a sequence of bytes. end in this context means the last position of that byte string; for a left-to-right language like English or Russian, this will be right side, and for right-to-left languages like Arabic or Hebrew, this will be the left side.

-
Examples
+
§Examples

Simple patterns:

-
assert_eq!("11foo1bar11".trim_end_matches('1'), "11foo1bar");
-assert_eq!("123foo1bar123".trim_end_matches(char::is_numeric), "123foo1bar");
+
assert_eq!("11foo1bar11".trim_end_matches('1'), "11foo1bar");
+assert_eq!("123foo1bar123".trim_end_matches(char::is_numeric), "123foo1bar");
 
-let x: &[_] = &['1', '2'];
-assert_eq!("12foo1bar12".trim_end_matches(x), "12foo1bar");
+let x: &[_] = &['1', '2']; +assert_eq!("12foo1bar12".trim_end_matches(x), "12foo1bar");

A more complex pattern, using a closure:

-
assert_eq!("1fooX".trim_end_matches(|c| c == '1' || c == 'X'), "1foo");
-
1.0.0 · source

pub fn trim_left_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>,

👎Deprecated since 1.33.0: superseded by trim_start_matches

Returns a string slice with all prefixes that match a pattern +

assert_eq!("1fooX".trim_end_matches(|c| c == '1' || c == 'X'), "1foo");
+
1.0.0 · source

pub fn trim_left_matches<'a, P>(&'a self, pat: P) -> &'a str
where + P: Pattern<'a>,

👎Deprecated since 1.33.0: superseded by trim_start_matches

Returns a string slice with all prefixes that match a pattern repeatedly removed.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Text directionality
+
§Text directionality

A string is a sequence of bytes. ‘Left’ in this context means the first position of that byte string; for a language like Arabic or Hebrew which are ‘right to left’ rather than ‘left to right’, this will be the right side, not the left.

-
Examples
-
assert_eq!("11foo1bar11".trim_left_matches('1'), "foo1bar11");
-assert_eq!("123foo1bar123".trim_left_matches(char::is_numeric), "foo1bar123");
-
-let x: &[_] = &['1', '2'];
-assert_eq!("12foo1bar12".trim_left_matches(x), "foo1bar12");
-
1.0.0 · source

pub fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a strwhere - P: Pattern<'a>, - <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

👎Deprecated since 1.33.0: superseded by trim_end_matches

Returns a string slice with all suffixes that match a pattern +

§Examples
+
assert_eq!("11foo1bar11".trim_left_matches('1'), "foo1bar11");
+assert_eq!("123foo1bar123".trim_left_matches(char::is_numeric), "foo1bar123");
+
+let x: &[_] = &['1', '2'];
+assert_eq!("12foo1bar12".trim_left_matches(x), "foo1bar12");
+
1.0.0 · source

pub fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a str
where + P: Pattern<'a>, + <P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,

👎Deprecated since 1.33.0: superseded by trim_end_matches

Returns a string slice with all suffixes that match a pattern repeatedly removed.

-

The pattern can be a &str, char, a slice of chars, or a +

The pattern can be a &str, char, a slice of chars, or a function or closure that determines if a character matches.

-
Text directionality
+
§Text directionality

A string is a sequence of bytes. ‘Right’ in this context means the last position of that byte string; for a language like Arabic or Hebrew which are ‘right to left’ rather than ‘left to right’, this will be the left side, not the right.

-
Examples
+
§Examples

Simple patterns:

-
assert_eq!("11foo1bar11".trim_right_matches('1'), "11foo1bar");
-assert_eq!("123foo1bar123".trim_right_matches(char::is_numeric), "123foo1bar");
+
assert_eq!("11foo1bar11".trim_right_matches('1'), "11foo1bar");
+assert_eq!("123foo1bar123".trim_right_matches(char::is_numeric), "123foo1bar");
 
-let x: &[_] = &['1', '2'];
-assert_eq!("12foo1bar12".trim_right_matches(x), "12foo1bar");
+let x: &[_] = &['1', '2']; +assert_eq!("12foo1bar12".trim_right_matches(x), "12foo1bar");

A more complex pattern, using a closure:

-
assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
-
1.0.0 · source

pub fn parse<F>(&self) -> Result<F, <F as FromStr>::Err>where - F: FromStr,

Parses this string slice into another type.

+
assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo");
+
1.0.0 · source

pub fn parse<F>(&self) -> Result<F, <F as FromStr>::Err>
where + F: FromStr,

Parses this string slice into another type.

Because parse is so general, it can cause problems with type inference. As such, parse is one of the few times you’ll see the syntax affectionately known as the ‘turbofish’: ::<>. This helps the inference algorithm understand specifically which type you’re trying to parse into.

-

parse can parse into any type that implements the FromStr trait.

-
Errors
-

Will return Err if it’s not possible to parse this string slice into +

parse can parse into any type that implements the FromStr trait.

+
§Errors
+

Will return Err if it’s not possible to parse this string slice into the desired type.

-
Examples
+
§Examples

Basic usage

-
let four: u32 = "4".parse().unwrap();
+
let four: u32 = "4".parse().unwrap();
 
 assert_eq!(4, four);

Using the ‘turbofish’ instead of annotating four:

-
let four = "4".parse::<u32>();
+
let four = "4".parse::<u32>();
 
 assert_eq!(Ok(4), four);

Failing to parse:

-
let nope = "j".parse::<u32>();
+
let nope = "j".parse::<u32>();
 
 assert!(nope.is_err());
-
1.23.0 · source

pub fn is_ascii(&self) -> bool

Checks if all characters in this string are within the ASCII range.

-
Examples
-
let ascii = "hello!\n";
-let non_ascii = "Grüße, Jürgen ❤";
+
1.23.0 · source

pub fn is_ascii(&self) -> bool

Checks if all characters in this string are within the ASCII range.

+
§Examples
+
let ascii = "hello!\n";
+let non_ascii = "Grüße, Jürgen ❤";
 
 assert!(ascii.is_ascii());
 assert!(!non_ascii.is_ascii());
-
source

pub fn as_ascii(&self) -> Option<&[AsciiChar]>

🔬This is a nightly-only experimental API. (ascii_char)

If this string slice is_ascii, returns it as a slice -of ASCII characters, otherwise returns None.

-
1.23.0 · source

pub fn eq_ignore_ascii_case(&self, other: &str) -> bool

Checks that two strings are an ASCII case-insensitive match.

+
source

pub fn as_ascii(&self) -> Option<&[AsciiChar]>

🔬This is a nightly-only experimental API. (ascii_char)

If this string slice is_ascii, returns it as a slice +of ASCII characters, otherwise returns None.

+
1.23.0 · source

pub fn eq_ignore_ascii_case(&self, other: &str) -> bool

Checks that two strings are an ASCII case-insensitive match.

Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), but without allocating and copying temporaries.

-
Examples
-
assert!("Ferris".eq_ignore_ascii_case("FERRIS"));
-assert!("Ferrös".eq_ignore_ascii_case("FERRöS"));
-assert!(!"Ferrös".eq_ignore_ascii_case("FERRÖS"));
-
1.34.0 · source

pub fn escape_debug(&self) -> EscapeDebug<'_>

Return an iterator that escapes each char in self with char::escape_debug.

+
§Examples
+
assert!("Ferris".eq_ignore_ascii_case("FERRIS"));
+assert!("Ferrös".eq_ignore_ascii_case("FERRöS"));
+assert!(!"Ferrös".eq_ignore_ascii_case("FERRÖS"));
+
1.80.0 · source

pub fn trim_ascii_start(&self) -> &str

Returns a string slice with leading ASCII whitespace removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
§Examples
+
assert_eq!(" \t \u{3000}hello world\n".trim_ascii_start(), "\u{3000}hello world\n");
+assert_eq!("  ".trim_ascii_start(), "");
+assert_eq!("".trim_ascii_start(), "");
+
1.80.0 · source

pub fn trim_ascii_end(&self) -> &str

Returns a string slice with trailing ASCII whitespace removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
§Examples
+
assert_eq!("\r hello world\u{3000}\n ".trim_ascii_end(), "\r hello world\u{3000}");
+assert_eq!("  ".trim_ascii_end(), "");
+assert_eq!("".trim_ascii_end(), "");
+
1.80.0 · source

pub fn trim_ascii(&self) -> &str

Returns a string slice with leading and trailing ASCII whitespace +removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
§Examples
+
assert_eq!("\r hello world\n ".trim_ascii(), "hello world");
+assert_eq!("  ".trim_ascii(), "");
+assert_eq!("".trim_ascii(), "");
+
1.34.0 · source

pub fn escape_debug(&self) -> EscapeDebug<'_>

Return an iterator that escapes each char in self with char::escape_debug.

Note: only extended grapheme codepoints that begin the string will be escaped.

-
Examples
+
§Examples

As an iterator:

-
for c in "❤\n!".escape_debug() {
-    print!("{c}");
+
for c in "❤\n!".escape_debug() {
+    print!("{c}");
 }
 println!();

Using println! directly:

-
println!("{}", "❤\n!".escape_debug());
+
println!("{}", "❤\n!".escape_debug());

Both are equivalent to:

-
println!("❤\\n!");
+
println!("❤\\n!");

Using to_string:

-
assert_eq!("❤\n!".escape_debug().to_string(), "❤\\n!");
-
1.34.0 · source

pub fn escape_default(&self) -> EscapeDefault<'_>

Return an iterator that escapes each char in self with char::escape_default.

-
Examples
+
assert_eq!("❤\n!".escape_debug().to_string(), "❤\\n!");
+
1.34.0 · source

pub fn escape_default(&self) -> EscapeDefault<'_>

Return an iterator that escapes each char in self with char::escape_default.

+
§Examples

As an iterator:

-
for c in "❤\n!".escape_default() {
-    print!("{c}");
+
for c in "❤\n!".escape_default() {
+    print!("{c}");
 }
 println!();

Using println! directly:

-
println!("{}", "❤\n!".escape_default());
+
println!("{}", "❤\n!".escape_default());

Both are equivalent to:

-
println!("\\u{{2764}}\\n!");
+
println!("\\u{{2764}}\\n!");

Using to_string:

-
assert_eq!("❤\n!".escape_default().to_string(), "\\u{2764}\\n!");
-
1.34.0 · source

pub fn escape_unicode(&self) -> EscapeUnicode<'_>

Return an iterator that escapes each char in self with char::escape_unicode.

-
Examples
+
assert_eq!("❤\n!".escape_default().to_string(), "\\u{2764}\\n!");
+
1.34.0 · source

pub fn escape_unicode(&self) -> EscapeUnicode<'_>

Return an iterator that escapes each char in self with char::escape_unicode.

+
§Examples

As an iterator:

-
for c in "❤\n!".escape_unicode() {
-    print!("{c}");
+
for c in "❤\n!".escape_unicode() {
+    print!("{c}");
 }
 println!();

Using println! directly:

-
println!("{}", "❤\n!".escape_unicode());
+
println!("{}", "❤\n!".escape_unicode());

Both are equivalent to:

-
println!("\\u{{2764}}\\u{{a}}\\u{{21}}");
+
println!("\\u{{2764}}\\u{{a}}\\u{{21}}");

Using to_string:

-
assert_eq!("❤\n!".escape_unicode().to_string(), "\\u{2764}\\u{a}\\u{21}");
-
1.0.0 · source

pub fn replace<'a, P>(&'a self, from: P, to: &str) -> Stringwhere - P: Pattern<'a>,

Replaces all matches of a pattern with another string.

-

replace creates a new String, and copies the data from this string slice into it. +

assert_eq!("❤\n!".escape_unicode().to_string(), "\\u{2764}\\u{a}\\u{21}");
+
1.0.0 · source

pub fn replace<'a, P>(&'a self, from: P, to: &str) -> String
where + P: Pattern<'a>,

Replaces all matches of a pattern with another string.

+

replace creates a new String, and copies the data from this string slice into it. While doing so, it attempts to find matches of a pattern. If it finds any, it replaces them with the replacement string slice.

-
Examples
+
§Examples

Basic usage:

-
let s = "this is old";
+
let s = "this is old";
 
-assert_eq!("this is new", s.replace("old", "new"));
-assert_eq!("than an old", s.replace("is", "an"));
-

When the pattern doesn’t match, it returns this string slice as String:

+assert_eq!("this is new", s.replace("old", "new")); +assert_eq!("than an old", s.replace("is", "an"));
+

When the pattern doesn’t match, it returns this string slice as String:

-
let s = "this is old";
-assert_eq!(s, s.replace("cookie monster", "little lamb"));
-
1.16.0 · source

pub fn replacen<'a, P>(&'a self, pat: P, to: &str, count: usize) -> Stringwhere - P: Pattern<'a>,

Replaces first N matches of a pattern with another string.

-

replacen creates a new String, and copies the data from this string slice into it. +

let s = "this is old";
+assert_eq!(s, s.replace("cookie monster", "little lamb"));
+
1.16.0 · source

pub fn replacen<'a, P>(&'a self, pat: P, to: &str, count: usize) -> String
where + P: Pattern<'a>,

Replaces first N matches of a pattern with another string.

+

replacen creates a new String, and copies the data from this string slice into it. While doing so, it attempts to find matches of a pattern. If it finds any, it replaces them with the replacement string slice at most count times.

-
Examples
+
§Examples

Basic usage:

-
let s = "foo foo 123 foo";
-assert_eq!("new new 123 foo", s.replacen("foo", "new", 2));
-assert_eq!("faa fao 123 foo", s.replacen('o', "a", 3));
-assert_eq!("foo foo new23 foo", s.replacen(char::is_numeric, "new", 1));
-

When the pattern doesn’t match, it returns this string slice as String:

+
let s = "foo foo 123 foo";
+assert_eq!("new new 123 foo", s.replacen("foo", "new", 2));
+assert_eq!("faa fao 123 foo", s.replacen('o', "a", 3));
+assert_eq!("foo foo new23 foo", s.replacen(char::is_numeric, "new", 1));
+

When the pattern doesn’t match, it returns this string slice as String:

-
let s = "this is old";
-assert_eq!(s, s.replacen("cookie monster", "little lamb", 10));
-
1.2.0 · source

pub fn to_lowercase(&self) -> String

Returns the lowercase equivalent of this string slice, as a new String.

+
let s = "this is old";
+assert_eq!(s, s.replacen("cookie monster", "little lamb", 10));
+
1.2.0 · source

pub fn to_lowercase(&self) -> String

Returns the lowercase equivalent of this string slice, as a new String.

‘Lowercase’ is defined according to the terms of the Unicode Derived Core Property Lowercase.

Since some characters can expand into multiple characters when changing -the case, this function returns a String instead of modifying the +the case, this function returns a String instead of modifying the parameter in-place.

-
Examples
+
§Examples

Basic usage:

-
let s = "HELLO";
+
let s = "HELLO";
 
-assert_eq!("hello", s.to_lowercase());
+assert_eq!("hello", s.to_lowercase());

A tricky example, with sigma:

-
let sigma = "Σ";
+
let sigma = "Σ";
 
-assert_eq!("σ", sigma.to_lowercase());
+assert_eq!("σ", sigma.to_lowercase());
 
-// but at the end of a word, it's ς, not σ:
-let odysseus = "ὈΔΥΣΣΕΎΣ";
+// but at the end of a word, it's ς, not σ:
+let odysseus = "ὈΔΥΣΣΕΎΣ";
 
-assert_eq!("ὀδυσσεύς", odysseus.to_lowercase());
+assert_eq!("ὀδυσσεύς", odysseus.to_lowercase());

Languages without case are not changed:

-
let new_year = "农历新年";
+
let new_year = "农历新年";
 
 assert_eq!(new_year, new_year.to_lowercase());
-
1.2.0 · source

pub fn to_uppercase(&self) -> String

Returns the uppercase equivalent of this string slice, as a new String.

+
1.2.0 · source

pub fn to_uppercase(&self) -> String

Returns the uppercase equivalent of this string slice, as a new String.

‘Uppercase’ is defined according to the terms of the Unicode Derived Core Property Uppercase.

Since some characters can expand into multiple characters when changing -the case, this function returns a String instead of modifying the +the case, this function returns a String instead of modifying the parameter in-place.

-
Examples
+
§Examples

Basic usage:

-
let s = "hello";
+
let s = "hello";
 
-assert_eq!("HELLO", s.to_uppercase());
+assert_eq!("HELLO", s.to_uppercase());

Scripts without case are not changed:

-
let new_year = "农历新年";
+
let new_year = "农历新年";
 
 assert_eq!(new_year, new_year.to_uppercase());

One character can become multiple:

-
let s = "tschüß";
+
let s = "tschüß";
 
-assert_eq!("TSCHÜSS", s.to_uppercase());
-
1.16.0 · source

pub fn repeat(&self, n: usize) -> String

Creates a new String by repeating a string n times.

-
Panics
+assert_eq!("TSCHÜSS", s.to_uppercase());
+
1.16.0 · source

pub fn repeat(&self, n: usize) -> String

Creates a new String by repeating a string n times.

+
§Panics

This function will panic if the capacity would overflow.

-
Examples
+
§Examples

Basic usage:

-
assert_eq!("abc".repeat(4), String::from("abcabcabcabc"));
+
assert_eq!("abc".repeat(4), String::from("abcabcabcabc"));

A panic upon overflow:

// this will panic at runtime
-let huge = "0123456789abcdef".repeat(usize::MAX);
-
1.23.0 · source

pub fn to_ascii_uppercase(&self) -> String

Returns a copy of this string where each character is mapped to its +let huge = "0123456789abcdef".repeat(usize::MAX);

+
1.23.0 · source

pub fn to_ascii_uppercase(&self) -> String

Returns a copy of this string where each character is mapped to its ASCII upper case equivalent.

ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged.

-

To uppercase the value in-place, use make_ascii_uppercase.

+

To uppercase the value in-place, use make_ascii_uppercase.

To uppercase ASCII characters in addition to non-ASCII characters, use to_uppercase.

-
Examples
-
let s = "Grüße, Jürgen ❤";
+
§Examples
+
let s = "Grüße, Jürgen ❤";
 
-assert_eq!("GRüßE, JüRGEN ❤", s.to_ascii_uppercase());
-
1.23.0 · source

pub fn to_ascii_lowercase(&self) -> String

Returns a copy of this string where each character is mapped to its +assert_eq!("GRüßE, JüRGEN ❤", s.to_ascii_uppercase());

+
1.23.0 · source

pub fn to_ascii_lowercase(&self) -> String

Returns a copy of this string where each character is mapped to its ASCII lower case equivalent.

ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.

-

To lowercase the value in-place, use make_ascii_lowercase.

+

To lowercase the value in-place, use make_ascii_lowercase.

To lowercase ASCII characters in addition to non-ASCII characters, use to_lowercase.

-
Examples
-
let s = "Grüße, Jürgen ❤";
-
-assert_eq!("grüße, jürgen ❤", s.to_ascii_lowercase());
-

Trait Implementations§

source§

impl Deref for SymbolStr<'_, '_>

§

type Target = str

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'de, 'ephemeral> RefUnwindSafe for SymbolStr<'de, 'ephemeral>

§

impl<'de, 'ephemeral> Send for SymbolStr<'de, 'ephemeral>

§

impl<'de, 'ephemeral> Sync for SymbolStr<'de, 'ephemeral>

§

impl<'de, 'ephemeral> Unpin for SymbolStr<'de, 'ephemeral>

§

impl<'de, 'ephemeral> UnwindSafe for SymbolStr<'de, 'ephemeral>

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+
§Examples
+
let s = "Grüße, Jürgen ❤";
+
+assert_eq!("grüße, jürgen ❤", s.to_ascii_lowercase());
+

Trait Implementations§

source§

impl Deref for SymbolStr<'_, '_>

§

type Target = str

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'de, 'ephemeral> Freeze for SymbolStr<'de, 'ephemeral>

§

impl<'de, 'ephemeral> RefUnwindSafe for SymbolStr<'de, 'ephemeral>

§

impl<'de, 'ephemeral> Send for SymbolStr<'de, 'ephemeral>

§

impl<'de, 'ephemeral> Sync for SymbolStr<'de, 'ephemeral>

§

impl<'de, 'ephemeral> Unpin for SymbolStr<'de, 'ephemeral>

§

impl<'de, 'ephemeral> UnwindSafe for SymbolStr<'de, 'ephemeral>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/de/index.html b/main/pot/de/index.html index 727bc2b9..ac1f2013 100644 --- a/main/pot/de/index.html +++ b/main/pot/de/index.html @@ -1,3 +1,3 @@ -pot::de - Rust

Module pot::de

source ·
Expand description

Types for deserializing pots.

-

Structs

Enums

Type Definitions

\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/de/struct.SymbolList.html b/main/pot/de/struct.SymbolList.html index 6690619f..bed5c650 100644 --- a/main/pot/de/struct.SymbolList.html +++ b/main/pot/de/struct.SymbolList.html @@ -1,46 +1,46 @@ -SymbolList in pot::de - Rust

Struct pot::de::SymbolList

source ·
pub struct SymbolList<'de> { /* private fields */ }
Expand description

A collection of symbols accumulated during deserialization.

-

Implementations§

source§

impl<'de> SymbolList<'de>

source

pub const fn new() -> Self

Returns a new, empty symbol list.

-
source

pub fn push_borrowed(&mut self, borrowed: &'de str)

Push a symbol that has been borrowed from the deserialization source.

-
source

pub fn push(&mut self, ephemeral: &str)

Push a symbol that cannot be borrowed from the deserialization source.

-
source

pub fn get(&self, index: usize) -> Option<SymbolStr<'de, '_>>

Return the symbol stored at index, or None if index is out of +SymbolList in pot::de - Rust

Struct pot::de::SymbolList

source ·
pub struct SymbolList<'de> { /* private fields */ }
Expand description

A collection of symbols accumulated during deserialization.

+

Implementations§

source§

impl<'de> SymbolList<'de>

source

pub const fn new() -> Self

Returns a new, empty symbol list.

+
source

pub fn push_borrowed(&mut self, borrowed: &'de str)

Push a symbol that has been borrowed from the deserialization source.

+
source

pub fn push(&mut self, ephemeral: &str)

Push a symbol that cannot be borrowed from the deserialization source.

+
source

pub fn get(&self, index: usize) -> Option<SymbolStr<'de, '_>>

Return the symbol stored at index, or None if index is out of bounds.

-
source

pub fn len(&self) -> usize

Returns the number of entries in the symbol list.

-
source

pub fn is_empty(&self) -> bool

Returns true if there are no symbols in this list.

-
source§

impl SymbolList<'static>

source

pub fn deserializer_for_slice<'a, 'de>( +

source

pub fn len(&self) -> usize

Returns the number of entries in the symbol list.

+
source

pub fn is_empty(&self) -> bool

Returns true if there are no symbols in this list.

+
source§

impl SymbolList<'static>

source

pub fn deserializer_for_slice<'a, 'de>( &'a mut self, - slice: &'de [u8] + slice: &'de [u8], ) -> Result<Deserializer<'a, 'de, SliceReader<'de>>>

Returns a deserializer for slice that reuses symbol ids.

This should only be used with data generated by using a persistent ser::SymbolMap.

-
source

pub fn deserializer_for<'de, R>( +

source

pub fn deserializer_for<'de, R>( &mut self, - reader: R -) -> Result<Deserializer<'_, 'de, IoReader<R>>>where - R: Read,

Returns a deserializer for reader.

+ reader: R, +) -> Result<Deserializer<'_, 'de, IoReader<R>>>
where + R: Read,

Returns a deserializer for reader.

This should only be used with data generated by using a persistent ser::SymbolMap.

-
source

pub fn deserialize_slice<'de, T>(&mut self, slice: &'de [u8]) -> Result<T>where - T: Deserialize<'de>,

Deserializes T from slice.

+
source

pub fn deserialize_slice<'de, T>(&mut self, slice: &'de [u8]) -> Result<T>
where + T: Deserialize<'de>,

Deserializes T from slice.

This should only be used with data generated by using a persistent ser::SymbolMap.

-
source

pub fn deserialize_from<'de, T>(&mut self, reader: impl Read) -> Result<T>where - T: Deserialize<'de>,

Deserializes T from reader.

+
source

pub fn deserialize_from<'de, T>(&mut self, reader: impl Read) -> Result<T>
where + T: Deserialize<'de>,

Deserializes T from reader.

This should only be used with data generated by using a persistent ser::SymbolMap.

-

Trait Implementations§

source§

impl<'de> Debug for SymbolList<'de>

source§

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

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

impl Default for SymbolList<'_>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'de> RefUnwindSafe for SymbolList<'de>

§

impl<'de> Send for SymbolList<'de>

§

impl<'de> Sync for SymbolList<'de>

§

impl<'de> Unpin for SymbolList<'de>

§

impl<'de> UnwindSafe for SymbolList<'de>

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl<'de> Debug for SymbolList<'de>

source§

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

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

impl Default for SymbolList<'_>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'de> Freeze for SymbolList<'de>

§

impl<'de> RefUnwindSafe for SymbolList<'de>

§

impl<'de> Send for SymbolList<'de>

§

impl<'de> Sync for SymbolList<'de>

§

impl<'de> Unpin for SymbolList<'de>

§

impl<'de> UnwindSafe for SymbolList<'de>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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 +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

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 T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/main/pot/de/struct.SymbolMapRef.html b/main/pot/de/struct.SymbolMapRef.html index 875ae0e3..dd2e7921 100644 --- a/main/pot/de/struct.SymbolMapRef.html +++ b/main/pot/de/struct.SymbolMapRef.html @@ -1,17 +1,17 @@ -SymbolMapRef in pot::de - Rust

Struct pot::de::SymbolMapRef

source ·
pub struct SymbolMapRef<'a, 'de>(_);
Expand description

A reference to a SymbolList.

-

Trait Implementations§

source§

impl<'a, 'de> Debug for SymbolMapRef<'a, 'de>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, 'de> RefUnwindSafe for SymbolMapRef<'a, 'de>

§

impl<'a, 'de> Send for SymbolMapRef<'a, 'de>

§

impl<'a, 'de> Sync for SymbolMapRef<'a, 'de>

§

impl<'a, 'de> Unpin for SymbolMapRef<'a, 'de>

§

impl<'a, 'de> !UnwindSafe for SymbolMapRef<'a, 'de>

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+SymbolMapRef in pot::de - Rust

Struct pot::de::SymbolMapRef

source ·
pub struct SymbolMapRef<'a, 'de>(/* private fields */);
Expand description

A reference to a SymbolList.

+

Trait Implementations§

source§

impl<'a, 'de> Debug for SymbolMapRef<'a, 'de>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, 'de> Freeze for SymbolMapRef<'a, 'de>

§

impl<'a, 'de> RefUnwindSafe for SymbolMapRef<'a, 'de>

§

impl<'a, 'de> Send for SymbolMapRef<'a, 'de>

§

impl<'a, 'de> Sync for SymbolMapRef<'a, 'de>

§

impl<'a, 'de> Unpin for SymbolMapRef<'a, 'de>

§

impl<'a, 'de> !UnwindSafe for SymbolMapRef<'a, 'de>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/de/type.SymbolMap.html b/main/pot/de/type.SymbolMap.html index be446028..e4ea78a2 100644 --- a/main/pot/de/type.SymbolMap.html +++ b/main/pot/de/type.SymbolMap.html @@ -1,26 +1,26 @@ -SymbolMap in pot::de - Rust

Type Definition pot::de::SymbolMap

source ·
pub type SymbolMap = SymbolList<'static>;
Expand description

An alias to a SymbolList with a static lifetime. This type persists +SymbolMap in pot::de - Rust

Type Alias pot::de::SymbolMap

source ·
pub type SymbolMap = SymbolList<'static>;
Expand description

An alias to a SymbolList with a static lifetime. This type persists symbols referenced across multiple deserialization sessions.

-

Implementations§

source§

impl SymbolMap

source

pub fn deserializer_for_slice<'a, 'de>( +

Aliased Type§

struct SymbolMap { /* private fields */ }

Implementations§

source§

impl SymbolMap

source

pub fn deserializer_for_slice<'a, 'de>( &'a mut self, - slice: &'de [u8] + slice: &'de [u8], ) -> Result<Deserializer<'a, 'de, SliceReader<'de>>>

Returns a deserializer for slice that reuses symbol ids.

This should only be used with data generated by using a persistent ser::SymbolMap.

-
source

pub fn deserializer_for<'de, R>( +

source

pub fn deserializer_for<'de, R>( &mut self, - reader: R -) -> Result<Deserializer<'_, 'de, IoReader<R>>>where - R: Read,

Returns a deserializer for reader.

+ reader: R, +) -> Result<Deserializer<'_, 'de, IoReader<R>>>
where + R: Read,

Returns a deserializer for reader.

This should only be used with data generated by using a persistent ser::SymbolMap.

-
source

pub fn deserialize_slice<'de, T>(&mut self, slice: &'de [u8]) -> Result<T>where - T: Deserialize<'de>,

Deserializes T from slice.

+
source

pub fn deserialize_slice<'de, T>(&mut self, slice: &'de [u8]) -> Result<T>
where + T: Deserialize<'de>,

Deserializes T from slice.

This should only be used with data generated by using a persistent ser::SymbolMap.

-
source

pub fn deserialize_from<'de, T>(&mut self, reader: impl Read) -> Result<T>where - T: Deserialize<'de>,

Deserializes T from reader.

+
source

pub fn deserialize_from<'de, T>(&mut self, reader: impl Read) -> Result<T>
where + T: Deserialize<'de>,

Deserializes T from reader.

This should only be used with data generated by using a persistent ser::SymbolMap.

-

Trait Implementations§

source§

impl<'de> Deserialize<'de> for SymbolMap

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 Serialize for SymbolMap

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
\ No newline at end of file +

Trait Implementations§

source§

impl<'de> Deserialize<'de> for SymbolMap

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 Serialize for SymbolMap

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
\ No newline at end of file diff --git a/main/pot/enum.Compatibility.html b/main/pot/enum.Compatibility.html new file mode 100644 index 00000000..10dd296c --- /dev/null +++ b/main/pot/enum.Compatibility.html @@ -0,0 +1,35 @@ +Compatibility in pot - Rust

Enum pot::Compatibility

source ·
#[non_exhaustive]
pub enum Compatibility { + Full, + V4, +}
Expand description

Compatibility settings for Pot.

+

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Full

Serializes data that is compatible with all versions of Pot +deserializers.

+

This format does not support Value deserialization of +enum variants without associated data. See V5 for more +information.

+
§

V4

Serializes data in the default format

+

This format has a single change in how enum variants without associated +data are serialized. This change allows deserialize_any to +unambiguously distinguish between variants with associated data and +variants without associated data.

+

This will be the default compatibility setting in v4.0 and later. All +versions after v3.0.1 are able to read this updated format.

+

Trait Implementations§

source§

impl Clone for Compatibility

source§

fn clone(&self) -> Compatibility

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 Compatibility

source§

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

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

impl Default for Compatibility

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq for Compatibility

source§

fn eq(&self, other: &Compatibility) -> 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 Copy for Compatibility

source§

impl Eq for Compatibility

source§

impl StructuralPartialEq for Compatibility

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/enum.Error.html b/main/pot/enum.Error.html index 3a15f44d..c369570a 100644 --- a/main/pot/enum.Error.html +++ b/main/pot/enum.Error.html @@ -1,62 +1,60 @@ -Error in pot - Rust

Enum pot::Error

source ·
#[non_exhaustive]
pub enum Error { +Error in pot - Rust

Enum pot::Error

source ·
#[non_exhaustive]
pub enum Error {
Show 16 variants NotAPot, IncompatibleVersion, - Message(String), + Message(String), TrailingBytes, Eof, ImpreciseCastWouldLoseData, - Io(Error), + Io(Error), SequenceSizeMustBeKnown, - InvalidUtf8(String), - InvalidKind(u8), + InvalidUtf8(String), + InvalidKind(u8), UnexpectedKind(Kind, Kind), - UnknownSymbol(u64), - UnsupportedByteCount(Kind, usize), + UnknownSymbol(u64), + UnsupportedByteCount(Kind, usize), InvalidAtomHeader, TooManyBytesRead, UnknownSpecial(UnknownSpecial),
}
Expand description

All errors that Pot may return.

-

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

NotAPot

Payload is not a Pot payload.

+

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

NotAPot

Payload is not a Pot payload.

§

IncompatibleVersion

Data was written with an incompatible version.

-
§

Message(String)

A generic error occurred.

+
§

Message(String)

A generic error occurred.

§

TrailingBytes

Extra data appeared at the end of the input.

§

Eof

Expected more data but encountered the end of the input.

§

ImpreciseCastWouldLoseData

A numerical value could not be handled without losing precision or truncation.

-
§

Io(Error)

An IO error occurred.

+
§

Io(Error)

An IO error occurred.

§

SequenceSizeMustBeKnown

A sequence of unknown size cannot be serialized.

-
§

InvalidUtf8(String)

String data contained invalid UTF-8 characters.

-
§

InvalidKind(u8)

An unknown kind was encountered. Generally a sign that something else has been parsed incorrectly.

+
§

InvalidUtf8(String)

String data contained invalid UTF-8 characters.

+
§

InvalidKind(u8)

An unknown kind was encountered. Generally a sign that something else has been parsed incorrectly.

§

UnexpectedKind(Kind, Kind)

Encountered an unexpected atom kind.

-
§

UnknownSymbol(u64)

A requested symbol id was not found.

-
§

UnsupportedByteCount(Kind, usize)

An unsupported byte count for a numeric type was encountered.

+
§

UnknownSymbol(u64)

A requested symbol id was not found.

+
§

UnsupportedByteCount(Kind, usize)

An unsupported byte count for a numeric type was encountered.

§

InvalidAtomHeader

An atom header was incorrectly formatted.

§

TooManyBytesRead

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

§

UnknownSpecial(UnknownSpecial)

An unknown Special was encountered.

-

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, f: &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

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, f: &mut Formatter<'_>) -> Result

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

impl Error for Error

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, request: &mut Request<'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

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 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

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 From<Error> for Error

source§

fn from(err: 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<UnknownSpecial> for Error

source§

fn from(err: UnknownSpecial) -> 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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+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 custom<T: Display>(msg: T) -> Self

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

impl From<Error> for Error

source§

fn from(err: 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<UnknownSpecial> for Error

source§

fn from(err: UnknownSpecial) -> 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 Freeze for Error

§

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 T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

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

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/enum.Value.html b/main/pot/enum.Value.html index 926a83cc..7371b5bb 100644 --- a/main/pot/enum.Value.html +++ b/main/pot/enum.Value.html @@ -1,25 +1,25 @@ -Value in pot - Rust

Enum pot::Value

source ·
pub enum Value<'a> {
+Value in pot - Rust

Enum pot::Value

source ·
pub enum Value<'a> {
     None,
     Unit,
-    Bool(bool),
+    Bool(bool),
     Integer(Integer),
     Float(Float),
-    Bytes(Cow<'a, [u8]>),
-    String(Cow<'a, str>),
-    Sequence(Vec<Self>),
-    Mappings(Vec<(Self, Self)>),
+    Bytes(Cow<'a, [u8]>),
+    String(Cow<'a, str>),
+    Sequence(Vec<Self>),
+    Mappings(Vec<(Self, Self)>),
 }
Expand description

A Pot-encoded value. This type can be used to deserialize to and from Pot without knowing the original data structure.

-

Variants§

§

None

A value representing None.

+

Variants§

§

None

A value representing None.

§

Unit

A value representing unit (()).

-
§

Bool(bool)

A boolean value

+
§

Bool(bool)

A boolean value

§

Integer(Integer)

An integer value.

§

Float(Float)

A floating point value.

-
§

Bytes(Cow<'a, [u8]>)

A value containing arbitrary bytes.

-
§

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) -> Result<Self, ValueError>

Creates a Value from the given Serde-compatible type.

+
§

Bytes(Cow<'a, [u8]>)

A value containing arbitrary bytes.

+
§

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) -> Result<Self, ValueError>

Creates a Value from the given Serde-compatible type.

use pot::Value;
 use serde_derive::Serialize;
@@ -35,13 +35,13 @@
 assert_eq!(
     serialized,
     Value::Sequence(vec![
-        Value::from(String::from("Hello")),
-        Value::from(String::from("World"))
+        Value::from(String::from("Hello")),
+        Value::from(String::from("World"))
     ])
 );
-
source

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

Attempts to create an instance of T from this value.

+
source

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

Attempts to create an instance of T from this value.

use pot::Value;
 use serde_derive::{Deserialize, Serialize};
@@ -56,19 +56,19 @@
 let serialized = Value::from_serialize(&original)?;
 let deserialized: Vec<Example> = serialized.deserialize_as()?;
 assert_eq!(deserialized, original);
-
source

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

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>>( - mappings: IntoIter +

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);
@@ -81,11 +81,11 @@
 
 // For all other types, having a length of 0 will result in is_empty returning true.
 assert_eq!(Value::from(Vec::<u8>::new()).is_empty(), true);
-assert_eq!(Value::from(b"").is_empty(), true);
+assert_eq!(Value::from(b"").is_empty(), true);
 assert_eq!(Value::from(vec![0_u8]).is_empty(), false);
 
-assert_eq!(Value::from("").is_empty(), true);
-assert_eq!(Value::from("hi").is_empty(), false);
+assert_eq!(Value::from("").is_empty(), true);
+assert_eq!(Value::from("hi").is_empty(), false);
 
 assert_eq!(Value::Sequence(Vec::new()).is_empty(), true);
 assert_eq!(Value::from(vec![Value::None]).is_empty(), false);
@@ -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);
@@ -115,11 +115,11 @@
 
 // For all other types, as_bool() returns the result of `!is_empty()`.
 assert_eq!(Value::from(Vec::<u8>::new()).as_bool(), false);
-assert_eq!(Value::from(b"").as_bool(), false);
+assert_eq!(Value::from(b"").as_bool(), false);
 assert_eq!(Value::from(vec![0_u8]).as_bool(), true);
 
-assert_eq!(Value::from("").as_bool(), false);
-assert_eq!(Value::from("hi").as_bool(), true);
+assert_eq!(Value::from("").as_bool(), false);
+assert_eq!(Value::from("hi").as_bool(), true);
 
 assert_eq!(Value::Sequence(Vec::new()).as_bool(), false);
 assert_eq!(Value::from(vec![Value::None]).as_bool(), true);
@@ -129,52 +129,52 @@
     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) -> ValueIter<'_>

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

source

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

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 Value<'a>> for OwnedValue

source§

fn from(value: &'a Value<'a>) -> 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<Value<'a>> for OwnedValue

source§

fn from(value: Value<'a>) -> 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, K, V> FromIterator<(K, V)> for Value<'a>where - K: Into<Value<'a>>, - V: Into<Value<'a>>,

source§

fn from_iter<T: IntoIterator<Item = (K, V)>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl<'a, A> FromIterator<A> for Value<'a>where - A: Into<Value<'a>>,

source§

fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

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

source§

fn eq(&self, other: &Value<'b>) -> 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

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+
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 Value<'a>> for OwnedValue

source§

fn from(value: &'a Value<'a>) -> 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<Value<'a>> for OwnedValue

source§

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

Converts to this type from the input type.
source§

impl<'a> From<Vec<(Value<'a>, Value<'a>)>> 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>>> 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>> 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, K, V> FromIterator<(K, V)> for Value<'a>
where + K: Into<Value<'a>>, + V: Into<Value<'a>>,

source§

fn from_iter<T: IntoIterator<Item = (K, V)>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl<'a, A> FromIterator<A> for Value<'a>
where + A: Into<Value<'a>>,

source§

fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

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

source§

fn eq(&self, other: &Value<'b>) -> 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

Auto Trait Implementations§

§

impl<'a> Freeze for Value<'a>

§

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 T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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 +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

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 T
where + 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 1a615ac4..591999f2 100644 --- a/main/pot/enum.ValueError.html +++ b/main/pot/enum.ValueError.html @@ -1,44 +1,42 @@ -ValueError in pot - Rust

Enum pot::ValueError

source ·
pub enum ValueError {
+ValueError in pot - Rust

Enum pot::ValueError

source ·
pub enum ValueError {
     Expected {
-        kind: &'static str,
+        kind: &'static str,
         value: Value<'static>,
     },
-    Custom(String),
+    Custom(String),
 }
Expand description

An error from deserializing a type using Value::deserialize_as.

-

Variants§

§

Expected

Fields

§kind: &'static str

The kind of data expected.

-
§value: Value<'static>

The value that was encountered.

-

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

Variants§

§

Expected

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, f: &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 +

Fields

§kind: &'static str

The kind of data expected.

+
§value: Value<'static>

The value that was encountered.

+
§

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, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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, request: &mut Request<'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) -> Self
where + 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
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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+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

source§

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

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

impl PartialEq 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 T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

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

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/fn.from_reader.html b/main/pot/fn.from_reader.html index 99ca3ffc..919028bb 100644 --- a/main/pot/fn.from_reader.html +++ b/main/pot/fn.from_reader.html @@ -1,9 +1,9 @@ -from_reader in pot - Rust

Function pot::from_reader

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

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

+from_reader in pot - Rust

Function pot::from_reader

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

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

let mut serialized = Vec::new();
-pot::to_writer(&"hello world", &mut serialized).unwrap();
+pot::to_writer(&"hello world", &mut serialized).unwrap();
 let deserialized = pot::from_reader::<String, _>(&serialized[..]).unwrap();
-assert_eq!(deserialized, "hello world");
+assert_eq!(deserialized, "hello world");
\ No newline at end of file diff --git a/main/pot/fn.from_slice.html b/main/pot/fn.from_slice.html index 060ff86d..205c562e 100644 --- a/main/pot/fn.from_slice.html +++ b/main/pot/fn.from_slice.html @@ -1,7 +1,7 @@ -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.

+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.

-
let serialized = pot::to_vec(&"hello world").unwrap();
+
let serialized = pot::to_vec(&"hello world").unwrap();
 let deserialized = pot::from_slice::<String>(&serialized).unwrap();
-assert_eq!(deserialized, "hello world");
+assert_eq!(deserialized, "hello world");
\ No newline at end of file diff --git a/main/pot/fn.to_vec.html b/main/pot/fn.to_vec.html index 2dc96bbd..47ae6855 100644 --- a/main/pot/fn.to_vec.html +++ b/main/pot/fn.to_vec.html @@ -1,7 +1,7 @@ -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>.

+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>.

-
let serialized = pot::to_vec(&"hello world").unwrap();
+
let serialized = pot::to_vec(&"hello world").unwrap();
 let deserialized = pot::from_slice::<String>(&serialized).unwrap();
-assert_eq!(deserialized, "hello world");
+assert_eq!(deserialized, "hello world");
\ No newline at end of file diff --git a/main/pot/fn.to_writer.html b/main/pot/fn.to_writer.html index 1aeaf1e7..42b0a34d 100644 --- a/main/pot/fn.to_writer.html +++ b/main/pot/fn.to_writer.html @@ -1,9 +1,9 @@ -to_writer in pot - Rust

Function pot::to_writer

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

Serialize value using Pot into writer.

+to_writer in pot - Rust

Function pot::to_writer

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

Serialize value using Pot into writer.

let mut serialized = Vec::new();
-pot::to_writer(&"hello world", &mut serialized).unwrap();
+pot::to_writer(&"hello world", &mut serialized).unwrap();
 let deserialized = pot::from_reader::<String, _>(&serialized[..]).unwrap();
-assert_eq!(deserialized, "hello world");
+assert_eq!(deserialized, "hello world");
\ No newline at end of file diff --git a/main/pot/format/enum.Kind.html b/main/pot/format/enum.Kind.html index 49fd6253..906d5c1f 100644 --- a/main/pot/format/enum.Kind.html +++ b/main/pot/format/enum.Kind.html @@ -1,50 +1,50 @@ -Kind in pot::format - Rust

Enum pot::format::Kind

source ·
pub enum Kind {
-    Special,
-    Int,
-    UInt,
-    Float,
-    Sequence,
-    Map,
-    Symbol,
-    Bytes,
+Kind in pot::format - Rust

Enum pot::format::Kind

source ·
pub enum Kind {
+    Special = 0,
+    Int = 1,
+    UInt = 2,
+    Float = 3,
+    Sequence = 4,
+    Map = 5,
+    Symbol = 6,
+    Bytes = 7,
 }
Expand description

The type of an atom.

-

Variants§

§

Special

A value with a special meaning.

-
§

Int

A signed integer. Argument is the byte length, minus one. The following +

Variants§

§

Special = 0

A value with a special meaning.

+
§

Int = 1

A signed integer. Argument is the byte length, minus one. The following bytes are the value, stored in little endian.

-
§

UInt

An unsigned integer. Argument is the byte length, minus one. The +

§

UInt = 2

An unsigned integer. Argument is the byte length, minus one. The following bytes are the value, stored in little endian.

-
§

Float

A floating point value. Argument is the byte length, minus one. Must be +

§

Float = 3

A floating point value. Argument is the byte length, minus one. Must be either 2, 4 or 8 bytes. The following bytes are the value, stored in little endian. The two-byte representation follows the IEEE 754-2008 -standard, implemented by the half crate.

-
§

Sequence

A list of atoms. Argument is the count of atoms in the sequence.

-
§

Map

A list of key-value pairs. Argument is the count of entries in the map. +standard, implemented by the half crate.

+
§

Sequence = 4

A list of atoms. Argument is the count of atoms in the sequence.

+
§

Map = 5

A list of key-value pairs. Argument is the count of entries in the map. There will be twice as many total atoms, since each entry is a key/value pair.

-
§

Symbol

A symbol. If the least-significant bit of the arg is 0, this is a new +

§

Symbol = 6

A symbol. If the least-significant bit of the arg is 0, this is a new symbol. The remaining bits of the arg contain the length in bytes. The following bytes will contain the symbol bytes (UTF-8). It should be stored and given a unique symbol id, starting at 0.

If the least-significant bit of the arg is 1, the remaining bits are the symbol id of a previously emitted symbol.

-
§

Bytes

A series of bytes. The argument is the length. The bytes follow.

-

Implementations§

source§

impl Kind

source

pub const fn from_u8(kind: u8) -> Result<Self, Error>

Converts from a u8. Returns an error if kind is an invalid value.

-

Trait Implementations§

source§

impl Clone for Kind

source§

fn clone(&self) -> Kind

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 Kind

source§

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

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

impl PartialEq<Kind> for Kind

source§

fn eq(&self, other: &Kind) -> 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 Copy for Kind

source§

impl Eq for Kind

source§

impl StructuralEq for Kind

source§

impl StructuralPartialEq for Kind

Auto Trait Implementations§

§

impl RefUnwindSafe for Kind

§

impl Send for Kind

§

impl Sync for Kind

§

impl Unpin for Kind

§

impl UnwindSafe for Kind

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+
§

Bytes = 7

A series of bytes. The argument is the length. The bytes follow.

+

Implementations§

source§

impl Kind

source

pub const fn from_u8(kind: u8) -> Result<Self, Error>

Converts from a u8. Returns an error if kind is an invalid value.

+

Trait Implementations§

source§

impl Clone for Kind

source§

fn clone(&self) -> Kind

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 Kind

source§

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

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

impl PartialEq for Kind

source§

fn eq(&self, other: &Kind) -> 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 Copy for Kind

source§

impl Eq for Kind

source§

impl StructuralPartialEq for Kind

Auto Trait Implementations§

§

impl Freeze for Kind

§

impl RefUnwindSafe for Kind

§

impl Send for Kind

§

impl Sync for Kind

§

impl Unpin for Kind

§

impl UnwindSafe for Kind

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/format/enum.Nucleus.html b/main/pot/format/enum.Nucleus.html index 09c6d4d6..72b5fe0b 100644 --- a/main/pot/format/enum.Nucleus.html +++ b/main/pot/format/enum.Nucleus.html @@ -1,5 +1,5 @@ -Nucleus in pot::format - Rust

Enum pot::format::Nucleus

source ·
pub enum Nucleus<'de> {
-    Boolean(bool),
+Nucleus in pot::format - Rust

Enum pot::format::Nucleus

source ·
pub enum Nucleus<'de> {
+    Boolean(bool),
     Integer(Integer),
     Float(Float),
     Bytes(BufferedBytes<'de>),
@@ -8,7 +8,7 @@
     DynamicMap,
     DynamicEnd,
 }
Expand description

A value contained within an Atom.

-

Variants§

§

Boolean(bool)

A boolean value.

+

Variants§

§

Boolean(bool)

A boolean value.

§

Integer(Integer)

An integer value.

§

Float(Float)

A floating point value.

§

Bytes(BufferedBytes<'de>)

A buffer of bytes.

@@ -16,19 +16,19 @@
§

Named

A named value.

§

DynamicMap

A marker denoting a map with unknown length is next in the file.

§

DynamicEnd

A marker denoting the end of a map with unknown length.

-

Trait Implementations§

source§

impl<'de> Debug for Nucleus<'de>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'de> RefUnwindSafe for Nucleus<'de>

§

impl<'de> Send for Nucleus<'de>

§

impl<'de> Sync for Nucleus<'de>

§

impl<'de> Unpin for Nucleus<'de>

§

impl<'de> UnwindSafe for Nucleus<'de>

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl<'de> Debug for Nucleus<'de>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'de> Freeze for Nucleus<'de>

§

impl<'de> RefUnwindSafe for Nucleus<'de>

§

impl<'de> Send for Nucleus<'de>

§

impl<'de> Sync for Nucleus<'de>

§

impl<'de> Unpin for Nucleus<'de>

§

impl<'de> UnwindSafe for Nucleus<'de>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/format/enum.Special.html b/main/pot/format/enum.Special.html index 37f374d6..9c78378f 100644 --- a/main/pot/format/enum.Special.html +++ b/main/pot/format/enum.Special.html @@ -1,32 +1,32 @@ -Special in pot::format - Rust

Enum pot::format::Special

source ·
pub enum Special {
-    None,
-    Unit,
-    False,
-    True,
-    Named,
-    DynamicMap,
-    DynamicEnd,
+Special in pot::format - Rust

Enum pot::format::Special

source ·
pub enum Special {
+    None = 0,
+    Unit = 1,
+    False = 2,
+    True = 3,
+    Named = 4,
+    DynamicMap = 5,
+    DynamicEnd = 6,
 }
Expand description

A special value type.

-

Variants§

§

None

A None value.

-
§

Unit

A Unit value.

-
§

False

The false boolean literal.

-
§

True

The true boolean literal.

-
§

Named

A named value. A symbol followed by another value.

-
§

DynamicMap

A sequence of key-value pairs with an unknown length.

-
§

DynamicEnd

A terminal value for a Self::DynamicMap.

-

Trait Implementations§

source§

impl Debug for Special

source§

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

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

impl TryFrom<u64> for Special

§

type Error = UnknownSpecial

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

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Variants§

§

None = 0

A None value.

+
§

Unit = 1

A Unit value.

+
§

False = 2

The false boolean literal.

+
§

True = 3

The true boolean literal.

+
§

Named = 4

A named value. A symbol followed by another value.

+
§

DynamicMap = 5

A sequence of key-value pairs with an unknown length.

+
§

DynamicEnd = 6

A terminal value for a Self::DynamicMap.

+

Trait Implementations§

source§

impl Debug for Special

source§

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

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

impl TryFrom<u64> for Special

§

type Error = UnknownSpecial

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

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/format/fn.read_atom.html b/main/pot/format/fn.read_atom.html index 76ec0c40..375e942c 100644 --- a/main/pot/format/fn.read_atom.html +++ b/main/pot/format/fn.read_atom.html @@ -1,6 +1,6 @@ -read_atom in pot::format - Rust

Function pot::format::read_atom

source ·
pub fn read_atom<'de, R: Reader<'de>>(
-    reader: &mut R,
-    remaining_budget: &mut usize,
-    scratch: &mut Vec<u8>
-) -> Result<Atom<'de>, Error>
Expand description

Reads an atom.

+read_atom in pot::format - Rust

Function pot::format::read_atom

source ·
pub fn read_atom<'de, R: Reader<'de>>(
+    reader: &mut R,
+    remaining_budget: &mut usize,
+    scratch: &mut Vec<u8>,
+) -> Result<Atom<'de>, Error>
Expand description

Reads an atom.

\ No newline at end of file diff --git a/main/pot/format/fn.read_atom_header.html b/main/pot/format/fn.read_atom_header.html index e6548a32..c459237d 100644 --- a/main/pot/format/fn.read_atom_header.html +++ b/main/pot/format/fn.read_atom_header.html @@ -1,4 +1,4 @@ -read_atom_header in pot::format - Rust

Function pot::format::read_atom_header

source ·
pub fn read_atom_header<R: ReadBytesExt>(
-    reader: &mut R
-) -> Result<(Kind, u64), Error>
Expand description

Reads an atom header (kind and argument).

+read_atom_header in pot::format - Rust

Function pot::format::read_atom_header

source ·
pub fn read_atom_header<R: ReadBytesExt>(
+    reader: &mut R,
+) -> Result<(Kind, u64), Error>
Expand description

Reads an atom header (kind and argument).

\ No newline at end of file diff --git a/main/pot/format/fn.read_header.html b/main/pot/format/fn.read_header.html index 707f4e19..bf610774 100644 --- a/main/pot/format/fn.read_header.html +++ b/main/pot/format/fn.read_header.html @@ -1,2 +1,2 @@ -read_header in pot::format - Rust

Function pot::format::read_header

source ·
pub fn read_header<R: ReadBytesExt>(reader: &mut R) -> Result<u8, Error>
Expand description

Reads a Pot header. See write_header for more information. Returns the version number contained within.

+read_header in pot::format - Rust

Function pot::format::read_header

source ·
pub fn read_header<R: ReadBytesExt>(reader: &mut R) -> Result<u8, Error>
Expand description

Reads a Pot header. See write_header for more information. Returns the version number contained within.

\ No newline at end of file diff --git a/main/pot/format/fn.write_atom_header.html b/main/pot/format/fn.write_atom_header.html index e1380987..8d145c19 100644 --- a/main/pot/format/fn.write_atom_header.html +++ b/main/pot/format/fn.write_atom_header.html @@ -1,6 +1,6 @@ -write_atom_header in pot::format - Rust

Function pot::format::write_atom_header

source ·
pub fn write_atom_header<W: WriteBytesExt>(
+write_atom_header in pot::format - Rust

Function pot::format::write_atom_header

source ·
pub fn write_atom_header<W: WriteBytesExt>(
     writer: W,
     kind: Kind,
-    arg: u64
-) -> Result<usize>
Expand description

Writes an atom header into writer.

+ arg: u64, +) -> Result<usize>
Expand description

Writes an atom header into writer.

\ No newline at end of file diff --git a/main/pot/format/fn.write_bool.html b/main/pot/format/fn.write_bool.html index 24dc43b7..10b52aa8 100644 --- a/main/pot/format/fn.write_bool.html +++ b/main/pot/format/fn.write_bool.html @@ -1,2 +1,2 @@ -write_bool in pot::format - Rust

Function pot::format::write_bool

source ·
pub fn write_bool<W: WriteBytesExt>(writer: W, boolean: bool) -> Result<usize>
Expand description

Writes a Kind::Special atom with either Special::True or Special::False.

+write_bool in pot::format - Rust

Function pot::format::write_bool

source ·
pub fn write_bool<W: WriteBytesExt>(writer: W, boolean: bool) -> Result<usize>
Expand description

Writes a Kind::Special atom with either Special::True or Special::False.

\ No newline at end of file diff --git a/main/pot/format/fn.write_bytes.html b/main/pot/format/fn.write_bytes.html index 4760e669..b1af6124 100644 --- a/main/pot/format/fn.write_bytes.html +++ b/main/pot/format/fn.write_bytes.html @@ -1,2 +1,2 @@ -write_bytes in pot::format - Rust

Function pot::format::write_bytes

source ·
pub fn write_bytes<W: WriteBytesExt>(writer: W, value: &[u8]) -> Result<usize>
Expand description

Writes an Kind::Bytes atom with the given value.

+write_bytes in pot::format - Rust

Function pot::format::write_bytes

source ·
pub fn write_bytes<W: WriteBytesExt>(writer: W, value: &[u8]) -> Result<usize>
Expand description

Writes an Kind::Bytes atom with the given value.

\ No newline at end of file diff --git a/main/pot/format/fn.write_f32.html b/main/pot/format/fn.write_f32.html index 8dd00cee..e799e503 100644 --- a/main/pot/format/fn.write_f32.html +++ b/main/pot/format/fn.write_f32.html @@ -1,2 +1,2 @@ -write_f32 in pot::format - Rust

Function pot::format::write_f32

source ·
pub fn write_f32<W: WriteBytesExt>(writer: W, value: f32) -> Result<usize>
Expand description

Writes an Kind::Float atom with the given value.

+write_f32 in pot::format - Rust

Function pot::format::write_f32

source ·
pub fn write_f32<W: WriteBytesExt>(writer: W, value: f32) -> Result<usize>
Expand description

Writes an Kind::Float atom with the given value.

\ No newline at end of file diff --git a/main/pot/format/fn.write_f64.html b/main/pot/format/fn.write_f64.html index c8893be0..c7bcdd82 100644 --- a/main/pot/format/fn.write_f64.html +++ b/main/pot/format/fn.write_f64.html @@ -1,2 +1,2 @@ -write_f64 in pot::format - Rust

Function pot::format::write_f64

source ·
pub fn write_f64<W: WriteBytesExt>(writer: W, value: f64) -> Result<usize>
Expand description

Writes an Kind::Float atom with the given value.

+write_f64 in pot::format - Rust

Function pot::format::write_f64

source ·
pub fn write_f64<W: WriteBytesExt>(writer: W, value: f64) -> Result<usize>
Expand description

Writes an Kind::Float atom with the given value.

\ No newline at end of file diff --git a/main/pot/format/fn.write_header.html b/main/pot/format/fn.write_header.html index 78cf4923..9c8f388b 100644 --- a/main/pot/format/fn.write_header.html +++ b/main/pot/format/fn.write_header.html @@ -1,4 +1,4 @@ -write_header in pot::format - Rust

Function pot::format::write_header

source ·
pub fn write_header<W: WriteBytesExt>(writer: W, version: u8) -> Result<usize>
Expand description

Writes the Pot header. A u32 written in big endian. The first three bytes +write_header in pot::format - Rust

Function pot::format::write_header

source ·
pub fn write_header<W: WriteBytesExt>(writer: W, version: u8) -> Result<usize>
Expand description

Writes the Pot header. A u32 written in big endian. The first three bytes are ‘Pot’ (0x506F74), and the fourth byte is the version. The first version of Pot is 0.

\ No newline at end of file diff --git a/main/pot/format/fn.write_i128.html b/main/pot/format/fn.write_i128.html index fe667cc2..e0356846 100644 --- a/main/pot/format/fn.write_i128.html +++ b/main/pot/format/fn.write_i128.html @@ -1,2 +1,2 @@ -write_i128 in pot::format - Rust

Function pot::format::write_i128

source ·
pub fn write_i128<W: WriteBytesExt>(writer: W, value: i128) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_i128 in pot::format - Rust

Function pot::format::write_i128

source ·
pub fn write_i128<W: WriteBytesExt>(writer: W, value: i128) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_i16.html b/main/pot/format/fn.write_i16.html index 97a1bbcb..412bd8c3 100644 --- a/main/pot/format/fn.write_i16.html +++ b/main/pot/format/fn.write_i16.html @@ -1,2 +1,2 @@ -write_i16 in pot::format - Rust

Function pot::format::write_i16

source ·
pub fn write_i16<W: WriteBytesExt>(writer: W, value: i16) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_i16 in pot::format - Rust

Function pot::format::write_i16

source ·
pub fn write_i16<W: WriteBytesExt>(writer: W, value: i16) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_i24.html b/main/pot/format/fn.write_i24.html index 98383db2..6cfe2045 100644 --- a/main/pot/format/fn.write_i24.html +++ b/main/pot/format/fn.write_i24.html @@ -1,2 +1,2 @@ -write_i24 in pot::format - Rust

Function pot::format::write_i24

source ·
pub fn write_i24<W: WriteBytesExt>(writer: W, value: i32) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_i24 in pot::format - Rust

Function pot::format::write_i24

source ·
pub fn write_i24<W: WriteBytesExt>(writer: W, value: i32) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_i32.html b/main/pot/format/fn.write_i32.html index 28b0baca..a7812e85 100644 --- a/main/pot/format/fn.write_i32.html +++ b/main/pot/format/fn.write_i32.html @@ -1,2 +1,2 @@ -write_i32 in pot::format - Rust

Function pot::format::write_i32

source ·
pub fn write_i32<W: WriteBytesExt>(writer: W, value: i32) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_i32 in pot::format - Rust

Function pot::format::write_i32

source ·
pub fn write_i32<W: WriteBytesExt>(writer: W, value: i32) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_i48.html b/main/pot/format/fn.write_i48.html index 9968df99..9b901671 100644 --- a/main/pot/format/fn.write_i48.html +++ b/main/pot/format/fn.write_i48.html @@ -1,2 +1,2 @@ -write_i48 in pot::format - Rust

Function pot::format::write_i48

source ·
pub fn write_i48<W: WriteBytesExt>(writer: W, value: i64) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_i48 in pot::format - Rust

Function pot::format::write_i48

source ·
pub fn write_i48<W: WriteBytesExt>(writer: W, value: i64) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_i64.html b/main/pot/format/fn.write_i64.html index 9d720cae..1e210a35 100644 --- a/main/pot/format/fn.write_i64.html +++ b/main/pot/format/fn.write_i64.html @@ -1,2 +1,2 @@ -write_i64 in pot::format - Rust

Function pot::format::write_i64

source ·
pub fn write_i64<W: WriteBytesExt>(writer: W, value: i64) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_i64 in pot::format - Rust

Function pot::format::write_i64

source ·
pub fn write_i64<W: WriteBytesExt>(writer: W, value: i64) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_i8.html b/main/pot/format/fn.write_i8.html index 331bd1fa..2bfb79bf 100644 --- a/main/pot/format/fn.write_i8.html +++ b/main/pot/format/fn.write_i8.html @@ -1,2 +1,2 @@ -write_i8 in pot::format - Rust

Function pot::format::write_i8

source ·
pub fn write_i8<W: WriteBytesExt>(writer: W, value: i8) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_i8 in pot::format - Rust

Function pot::format::write_i8

source ·
pub fn write_i8<W: WriteBytesExt>(writer: W, value: i8) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_named.html b/main/pot/format/fn.write_named.html index d750754e..6666574d 100644 --- a/main/pot/format/fn.write_named.html +++ b/main/pot/format/fn.write_named.html @@ -1,2 +1,2 @@ -write_named in pot::format - Rust

Function pot::format::write_named

source ·
pub fn write_named<W: WriteBytesExt>(writer: W) -> Result<usize>
Expand description

Writes a Kind::Special atom with Special::Named.

+write_named in pot::format - Rust

Function pot::format::write_named

source ·
pub fn write_named<W: WriteBytesExt>(writer: W) -> Result<usize>
Expand description

Writes a Kind::Special atom with Special::Named.

\ No newline at end of file diff --git a/main/pot/format/fn.write_none.html b/main/pot/format/fn.write_none.html index 49f717e8..d829640c 100644 --- a/main/pot/format/fn.write_none.html +++ b/main/pot/format/fn.write_none.html @@ -1,2 +1,2 @@ -write_none in pot::format - Rust

Function pot::format::write_none

source ·
pub fn write_none<W: WriteBytesExt>(writer: W) -> Result<usize>
Expand description

Writes a Kind::Special atom with Special::None.

+write_none in pot::format - Rust

Function pot::format::write_none

source ·
pub fn write_none<W: WriteBytesExt>(writer: W) -> Result<usize>
Expand description

Writes a Kind::Special atom with Special::None.

\ No newline at end of file diff --git a/main/pot/format/fn.write_special.html b/main/pot/format/fn.write_special.html index bea8f08b..d7f43a71 100644 --- a/main/pot/format/fn.write_special.html +++ b/main/pot/format/fn.write_special.html @@ -1,5 +1,5 @@ -write_special in pot::format - Rust

Function pot::format::write_special

source ·
pub fn write_special<W: WriteBytesExt>(
+write_special in pot::format - Rust

Function pot::format::write_special

source ·
pub fn write_special<W: WriteBytesExt>(
     writer: W,
-    special: Special
-) -> Result<usize>
Expand description

Writes a Kind::Special atom.

+ special: Special, +) -> Result<usize>
Expand description

Writes a Kind::Special atom.

\ No newline at end of file diff --git a/main/pot/format/fn.write_str.html b/main/pot/format/fn.write_str.html index ee65ccac..d0e5700d 100644 --- a/main/pot/format/fn.write_str.html +++ b/main/pot/format/fn.write_str.html @@ -1,2 +1,2 @@ -write_str in pot::format - Rust

Function pot::format::write_str

source ·
pub fn write_str<W: WriteBytesExt>(writer: W, value: &str) -> Result<usize>
Expand description

Writes an Kind::Bytes atom with the bytes of the string.

+write_str in pot::format - Rust

Function pot::format::write_str

source ·
pub fn write_str<W: WriteBytesExt>(writer: W, value: &str) -> Result<usize>
Expand description

Writes an Kind::Bytes atom with the bytes of the string.

\ No newline at end of file diff --git a/main/pot/format/fn.write_u128.html b/main/pot/format/fn.write_u128.html index ea873203..c974bed2 100644 --- a/main/pot/format/fn.write_u128.html +++ b/main/pot/format/fn.write_u128.html @@ -1,2 +1,2 @@ -write_u128 in pot::format - Rust

Function pot::format::write_u128

source ·
pub fn write_u128<W: WriteBytesExt>(writer: W, value: u128) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_u128 in pot::format - Rust

Function pot::format::write_u128

source ·
pub fn write_u128<W: WriteBytesExt>(writer: W, value: u128) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_u16.html b/main/pot/format/fn.write_u16.html index 878dff27..3ebff475 100644 --- a/main/pot/format/fn.write_u16.html +++ b/main/pot/format/fn.write_u16.html @@ -1,2 +1,2 @@ -write_u16 in pot::format - Rust

Function pot::format::write_u16

source ·
pub fn write_u16<W: WriteBytesExt>(writer: W, value: u16) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_u16 in pot::format - Rust

Function pot::format::write_u16

source ·
pub fn write_u16<W: WriteBytesExt>(writer: W, value: u16) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_u24.html b/main/pot/format/fn.write_u24.html index 0ab256c3..b894f757 100644 --- a/main/pot/format/fn.write_u24.html +++ b/main/pot/format/fn.write_u24.html @@ -1,2 +1,2 @@ -write_u24 in pot::format - Rust

Function pot::format::write_u24

source ·
pub fn write_u24<W: WriteBytesExt>(writer: W, value: u32) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_u24 in pot::format - Rust

Function pot::format::write_u24

source ·
pub fn write_u24<W: WriteBytesExt>(writer: W, value: u32) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_u32.html b/main/pot/format/fn.write_u32.html index 7e5feff5..edb0e43d 100644 --- a/main/pot/format/fn.write_u32.html +++ b/main/pot/format/fn.write_u32.html @@ -1,2 +1,2 @@ -write_u32 in pot::format - Rust

Function pot::format::write_u32

source ·
pub fn write_u32<W: WriteBytesExt>(writer: W, value: u32) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_u32 in pot::format - Rust

Function pot::format::write_u32

source ·
pub fn write_u32<W: WriteBytesExt>(writer: W, value: u32) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_u48.html b/main/pot/format/fn.write_u48.html index c6333b2e..74b4c1c2 100644 --- a/main/pot/format/fn.write_u48.html +++ b/main/pot/format/fn.write_u48.html @@ -1,2 +1,2 @@ -write_u48 in pot::format - Rust

Function pot::format::write_u48

source ·
pub fn write_u48<W: WriteBytesExt>(writer: W, value: u64) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_u48 in pot::format - Rust

Function pot::format::write_u48

source ·
pub fn write_u48<W: WriteBytesExt>(writer: W, value: u64) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_u64.html b/main/pot/format/fn.write_u64.html index f2ca49b8..73b85a1a 100644 --- a/main/pot/format/fn.write_u64.html +++ b/main/pot/format/fn.write_u64.html @@ -1,2 +1,2 @@ -write_u64 in pot::format - Rust

Function pot::format::write_u64

source ·
pub fn write_u64<W: WriteBytesExt>(writer: W, value: u64) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

+write_u64 in pot::format - Rust

Function pot::format::write_u64

source ·
pub fn write_u64<W: WriteBytesExt>(writer: W, value: u64) -> Result<usize>
Expand description

Writes an Kind::Int atom with the given value. Will encode in a smaller format if possible.

\ No newline at end of file diff --git a/main/pot/format/fn.write_u8.html b/main/pot/format/fn.write_u8.html index 55957bf0..e94ea025 100644 --- a/main/pot/format/fn.write_u8.html +++ b/main/pot/format/fn.write_u8.html @@ -1,2 +1,2 @@ -write_u8 in pot::format - Rust

Function pot::format::write_u8

source ·
pub fn write_u8<W: WriteBytesExt>(writer: W, value: u8) -> Result<usize>
Expand description

Writes an Kind::UInt atom with the given value.

+write_u8 in pot::format - Rust

Function pot::format::write_u8

source ·
pub fn write_u8<W: WriteBytesExt>(writer: W, value: u8) -> Result<usize>
Expand description

Writes an Kind::UInt atom with the given value.

\ No newline at end of file diff --git a/main/pot/format/fn.write_unit.html b/main/pot/format/fn.write_unit.html index 40b2f241..164549c3 100644 --- a/main/pot/format/fn.write_unit.html +++ b/main/pot/format/fn.write_unit.html @@ -1,2 +1,2 @@ -write_unit in pot::format - Rust

Function pot::format::write_unit

source ·
pub fn write_unit<W: WriteBytesExt>(writer: W) -> Result<usize>
Expand description

Writes a Kind::Special atom with Special::Unit.

+write_unit in pot::format - Rust

Function pot::format::write_unit

source ·
pub fn write_unit<W: WriteBytesExt>(writer: W) -> Result<usize>
Expand description

Writes a Kind::Special atom with Special::Unit.

\ No newline at end of file diff --git a/main/pot/format/index.html b/main/pot/format/index.html index 5de6ec74..29066b3d 100644 --- a/main/pot/format/index.html +++ b/main/pot/format/index.html @@ -1,4 +1,4 @@ -pot::format - Rust

Module pot::format

source ·
Expand description

Low-level interface for reading and writing the pot format.

-

Structs

  • An encoded Kind, argument, and optional contained value.
  • A floating point number that can safely convert between other number types using compile-time evaluation when possible.
  • An integer type that can safely convert between other number types using compile-time evaluation.
  • An unknown Special was encountered.

Enums

Functions

source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/format/struct.Float.html b/main/pot/format/struct.Float.html index fde072c6..47bdd429 100644 --- a/main/pot/format/struct.Float.html +++ b/main/pot/format/struct.Float.html @@ -1,32 +1,32 @@ -Float in pot::format - Rust

Struct pot::format::Float

source ·
pub struct Float(_);
Expand description

A floating point number that can safely convert between other number types using compile-time evaluation when possible.

-

Implementations§

source§

impl Float

source

pub fn is_zero(&self) -> bool

Returns true if the value contained is zero.

-
source

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

Returns this number as an f32, if it can be done without losing precision.

-
source

pub const fn as_f64(&self) -> f64

Returns this number as an f64.

-
source

pub fn as_integer(&self) -> Result<Integer, Error>

Returns this number as an Integer, if the stored value has no fractional part.

-
source

pub fn write_to<W: WriteBytesExt>(&self, writer: W) -> Result<usize>

Writes this value using the smallest form possible.

-
source

pub fn read_from<R: ReadBytesExt>( +Float in pot::format - Rust

Struct pot::format::Float

source ·
pub struct Float(/* private fields */);
Expand description

A floating point number that can safely convert between other number types using compile-time evaluation when possible.

+

Implementations§

source§

impl Float

source

pub fn is_zero(&self) -> bool

Returns true if the value contained is zero.

+
source

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

Returns this number as an f32, if it can be done without losing precision.

+
source

pub const fn as_f64(&self) -> f64

Returns this number as an f64.

+
source

pub fn as_integer(&self) -> Result<Integer, Error>

Returns this number as an Integer, if the stored value has no fractional part.

+
source

pub fn write_to<W: WriteBytesExt>(&self, writer: W) -> Result<usize>

Writes this value using the smallest form possible.

+
source

pub fn read_from<R: ReadBytesExt>( kind: Kind, - byte_len: usize, - reader: &mut R -) -> Result<Self, Error>

Reads a floating point number given the atom kind and byte_len. + byte_len: usize, + 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 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 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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

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 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 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 Copy for Float

source§

impl StructuralPartialEq for Float

Auto Trait Implementations§

§

impl Freeze for Float

§

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 T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/format/struct.Integer.html b/main/pot/format/struct.Integer.html index 731e2bcd..f7a761c4 100644 --- a/main/pot/format/struct.Integer.html +++ b/main/pot/format/struct.Integer.html @@ -1,42 +1,42 @@ -Integer in pot::format - Rust

Struct pot::format::Integer

source ·
pub struct Integer(_);
Expand description

An integer type that can safely convert between other number types using compile-time evaluation.

-

Implementations§

source§

impl Integer

source

pub const fn is_zero(&self) -> bool

Returns true if the value contained is zero.

-
source

pub const fn as_i8(&self) -> Result<i8, Error>

Returns the contained value as an i8, or an error if the value is unable to fit.

-
source

pub const fn as_u8(&self) -> Result<u8, Error>

Returns the contained value as an u8, or an error if the value is unable to fit.

-
source

pub const fn as_i16(&self) -> Result<i16, Error>

Returns the contained value as an i16, or an error if the value is unable to fit.

-
source

pub const fn as_u16(&self) -> Result<u16, Error>

Returns the contained value as an u16, or an error if the value is unable to fit.

-
source

pub const fn as_i32(&self) -> Result<i32, Error>

Returns the contained value as an i32, or an error if the value is unable to fit.

-
source

pub const fn as_u32(&self) -> Result<u32, Error>

Returns the contained value as an u32, or an error if the value is unable to fit.

-
source

pub const fn as_i64(&self) -> Result<i64, Error>

Returns the contained value as an i64, or an error if the value is unable to fit.

-
source

pub const fn as_i128(&self) -> Result<i128, Error>

Returns the contained value as an i64, or an error if the value is unable to fit.

-
source

pub const fn as_u64(&self) -> Result<u64, Error>

Returns the contained value as an u64, or an error if the value is unable to fit.

-
source

pub const fn as_u128(&self) -> Result<u128, Error>

Returns the contained value as an u64, or an error if the value is unable to fit.

-
source

pub fn write_to<W: WriteBytesExt>(&self, writer: W) -> Result<usize>

Writes this value using the smallest form possible.

-
source

pub fn read_from<R: ReadBytesExt>( +Integer in pot::format - Rust

Struct pot::format::Integer

source ·
pub struct Integer(/* private fields */);
Expand description

An integer type that can safely convert between other number types using compile-time evaluation.

+

Implementations§

source§

impl Integer

source

pub const fn is_zero(&self) -> bool

Returns true if the value contained is zero.

+
source

pub const fn as_i8(&self) -> Result<i8, Error>

Returns the contained value as an i8, or an error if the value is unable to fit.

+
source

pub const fn as_u8(&self) -> Result<u8, Error>

Returns the contained value as an u8, or an error if the value is unable to fit.

+
source

pub const fn as_i16(&self) -> Result<i16, Error>

Returns the contained value as an i16, or an error if the value is unable to fit.

+
source

pub const fn as_u16(&self) -> Result<u16, Error>

Returns the contained value as an u16, or an error if the value is unable to fit.

+
source

pub const fn as_i32(&self) -> Result<i32, Error>

Returns the contained value as an i32, or an error if the value is unable to fit.

+
source

pub const fn as_u32(&self) -> Result<u32, Error>

Returns the contained value as an u32, or an error if the value is unable to fit.

+
source

pub const fn as_i64(&self) -> Result<i64, Error>

Returns the contained value as an i64, or an error if the value is unable to fit.

+
source

pub const fn as_i128(&self) -> Result<i128, Error>

Returns the contained value as an i64, or an error if the value is unable to fit.

+
source

pub const fn as_u64(&self) -> Result<u64, Error>

Returns the contained value as an u64, or an error if the value is unable to fit.

+
source

pub const fn as_u128(&self) -> Result<u128, Error>

Returns the contained value as an u64, or an error if the value is unable to fit.

+
source

pub fn write_to<W: WriteBytesExt>(&self, writer: W) -> Result<usize>

Writes this value using the smallest form possible.

+
source

pub fn read_from<R: ReadBytesExt>( kind: Kind, - byte_len: usize, - reader: &mut R -) -> Result<Self, Error>

Reads an integer based on the atom header (kind and byte_len). + byte_len: usize, + reader: &mut R, +) -> Result<Self, Error>

Reads an integer based on the atom header (kind and byte_len). byte_len should be the argument from the atom header directly.

-
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 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 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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+
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 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 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 Copy for Integer

source§

impl Eq for Integer

source§

impl StructuralPartialEq for Integer

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/format/struct.UnknownSpecial.html b/main/pot/format/struct.UnknownSpecial.html index 6faf005c..0b1fddf1 100644 --- a/main/pot/format/struct.UnknownSpecial.html +++ b/main/pot/format/struct.UnknownSpecial.html @@ -1,21 +1,21 @@ -UnknownSpecial in pot::format - Rust

Struct pot::format::UnknownSpecial

source ·
pub struct UnknownSpecial(pub u64);
Expand description

An unknown Special was encountered.

-

Tuple Fields§

§0: u64

Trait Implementations§

source§

impl Clone for UnknownSpecial

source§

fn clone(&self) -> UnknownSpecial

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 UnknownSpecial

source§

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

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

impl Display for UnknownSpecial

source§

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

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

impl From<UnknownSpecial> for Error

source§

fn from(err: UnknownSpecial) -> Self

Converts to this type from the input type.
source§

impl PartialEq<UnknownSpecial> for UnknownSpecial

source§

fn eq(&self, other: &UnknownSpecial) -> 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 Copy for UnknownSpecial

source§

impl Eq for UnknownSpecial

source§

impl StructuralEq for UnknownSpecial

source§

impl StructuralPartialEq for UnknownSpecial

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+UnknownSpecial in pot::format - Rust

Struct pot::format::UnknownSpecial

source ·
pub struct UnknownSpecial(pub u64);
Expand description

An unknown Special was encountered.

+

Tuple Fields§

§0: u64

Trait Implementations§

source§

impl Clone for UnknownSpecial

source§

fn clone(&self) -> UnknownSpecial

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 UnknownSpecial

source§

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

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

impl Display for UnknownSpecial

source§

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

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

impl From<UnknownSpecial> for Error

source§

fn from(err: UnknownSpecial) -> Self

Converts to this type from the input type.
source§

impl PartialEq for UnknownSpecial

source§

fn eq(&self, other: &UnknownSpecial) -> 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 Copy for UnknownSpecial

source§

impl Eq for UnknownSpecial

source§

impl StructuralPartialEq for UnknownSpecial

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/index.html b/main/pot/index.html index 17967f50..12fcd39b 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 @@ -38,7 +38,7 @@ +-----------------+-----------+-----------------+

-

Example

+

§Example

use serde_derive::{Deserialize, Serialize};
 #[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]
 pub struct User {
@@ -49,24 +49,24 @@ 

Example

fn main() -> Result<(), pot::Error> { let user = User { id: 42, - name: String::from("ecton"), + name: String::from("ecton"), }; let serialized = pot::to_vec(&user)?; - println!("User serialized: {serialized:02x?}"); + println!("User serialized: {serialized:02x?}"); let deserialized: User = pot::from_slice(&serialized)?; assert_eq!(deserialized, user); - // Pot also provides a "Value" type for serializing Pot-encoded payloads + // Pot also provides a "Value" type for serializing Pot-encoded payloads // without needing the original structure. - let user: pot::Value<'_> = pot::from_slice(&serialized)?; - println!("User decoded as value: {user}"); + let user: pot::Value<'_> = pot::from_slice(&serialized)?; + println!("User decoded as value: {user}"); Ok(()) }

Outputs:

User serialized: [50, 6f, 74, 00, a2, c4, 69, 64, 40, 2a, c8, 6e, 61, 6d, 65, e5, 65, 63, 74, 6f, 6e]
 User decoded as value: {id: 42, name: ecton}
-

Benchmarks

+

§Benchmarks

Because benchmarks can be subjective and often don’t mirror real-world usage, this library’s authors aren’t making any specific performance claims. The way Pot achieves space savings requires some computational overhead. As such, it is @@ -75,12 +75,12 @@

Example

The results from the current benchmark suite executed on GitHub Actions are viewable here. The current suite is only aimed at comparing the default performance for each library.

-

Serialize into new Vec<u8>

+

§Serialize into new Vec<u8>

Serialize Benchmark Violin Chart

-

Serialize into reused Vec<u8>

+

§Serialize into reused Vec<u8>

Serialize with Reused Buffer Benchmark Violin Chart

-

Deserialize

+

§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 -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 +

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§

  • Compatibility settings for Pot.
  • 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 Aliases§

\ No newline at end of file diff --git a/main/pot/reader/enum.BufferedBytes.html b/main/pot/reader/enum.BufferedBytes.html index 46f4a40e..1e9e8d3e 100644 --- a/main/pot/reader/enum.BufferedBytes.html +++ b/main/pot/reader/enum.BufferedBytes.html @@ -1,24 +1,24 @@ -BufferedBytes in pot::reader - Rust
pub enum BufferedBytes<'de> {
-    Data(&'de [u8]),
+BufferedBytes in pot::reader - Rust

Enum pot::reader::BufferedBytes

source ·
pub enum BufferedBytes<'de> {
+    Data(&'de [u8]),
     Scratch,
 }
Expand description

Bytes that have been read into a buffer.

-

Variants§

§

Data(&'de [u8])

The bytes that have been read can be borrowed from the source.

+

Variants§

§

Data(&'de [u8])

The bytes that have been read can be borrowed from the source.

§

Scratch

The bytes that have been read have been stored in the scratch buffer passed to the function reading bytes.

-

Implementations§

source§

impl BufferedBytes<'_>

source

pub fn as_slice<'a>(&'a self, scratch: &'a [u8]) -> &'a [u8]

Resolves the bytes to a byte slice.

-

Trait Implementations§

source§

impl<'de> Debug for BufferedBytes<'de>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'de> RefUnwindSafe for BufferedBytes<'de>

§

impl<'de> Send for BufferedBytes<'de>

§

impl<'de> Sync for BufferedBytes<'de>

§

impl<'de> Unpin for BufferedBytes<'de>

§

impl<'de> UnwindSafe for BufferedBytes<'de>

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Implementations§

source§

impl BufferedBytes<'_>

source

pub fn as_slice<'a>(&'a self, scratch: &'a [u8]) -> &'a [u8]

Resolves the bytes to a byte slice.

+

Trait Implementations§

source§

impl<'de> Debug for BufferedBytes<'de>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'de> Freeze for BufferedBytes<'de>

§

impl<'de> RefUnwindSafe for BufferedBytes<'de>

§

impl<'de> Send for BufferedBytes<'de>

§

impl<'de> Sync for BufferedBytes<'de>

§

impl<'de> Unpin for BufferedBytes<'de>

§

impl<'de> UnwindSafe for BufferedBytes<'de>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/reader/index.html b/main/pot/reader/index.html index 7bba3987..8ddad21b 100644 --- a/main/pot/reader/index.html +++ b/main/pot/reader/index.html @@ -1,2 +1,2 @@ -pot::reader - Rust

Module pot::reader

source ·
Expand description

Types for reading data.

-

Structs

Enums

Traits

  • A reader that can temporarily buffer bytes read.
\ No newline at end of file +pot::reader - Rust

Module pot::reader

source ·
Expand description

Types for reading data.

+

Structs§

Enums§

Traits§

  • A reader that can temporarily buffer bytes read.
\ No newline at end of file diff --git a/main/pot/reader/struct.IoReader.html b/main/pot/reader/struct.IoReader.html index af4cef22..6d05390d 100644 --- a/main/pot/reader/struct.IoReader.html +++ b/main/pot/reader/struct.IoReader.html @@ -1,76 +1,77 @@ -IoReader in pot::reader - Rust

Struct pot::reader::IoReader

source ·
pub struct IoReader<R: ReadBytesExt> { /* private fields */ }
Expand description

A reader over [ReadBytesExt].

-

Trait Implementations§

source§

impl<R: ReadBytesExt> Read for IoReader<R>

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_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>

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

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

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

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

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

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

Read the exact number of bytes required to fill buf. 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
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 - Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · source§

fn chain<R>(self, next: R) -> Chain<Self, R>where - R: Read, - Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · source§

fn take(self, limit: u64) -> Take<Self>where - Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
source§

impl<'de, R: ReadBytesExt> Reader<'de> for IoReader<R>

source§

fn buffered_read_bytes( +IoReader in pot::reader - Rust

Struct pot::reader::IoReader

source ·
pub struct IoReader<R: ReadBytesExt> { /* private fields */ }
Expand description

A reader over [ReadBytesExt].

+

Trait Implementations§

source§

impl<R: ReadBytesExt> Read for IoReader<R>

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_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>

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

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

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

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

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

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

Read the exact number of bytes required to fill buf. 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
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 Self
where + Self: Sized,

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

fn bytes(self) -> Bytes<Self>
where + Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · source§

fn chain<R>(self, next: R) -> Chain<Self, R>
where + R: Read, + Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · source§

fn take(self, limit: u64) -> Take<Self>
where + Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
source§

impl<'de, R: ReadBytesExt> Reader<'de> for IoReader<R>

source§

fn buffered_read_bytes( &mut self, - length: usize, - scratch: &mut Vec<u8> -) -> Result<BufferedBytes<'de>, Error>

Reads exactly length bytes. Read more

Auto Trait Implementations§

§

impl<R> RefUnwindSafe for IoReader<R>where - R: RefUnwindSafe,

§

impl<R> Send for IoReader<R>where - R: Send,

§

impl<R> Sync for IoReader<R>where - R: Sync,

§

impl<R> Unpin for IoReader<R>where - R: Unpin,

§

impl<R> UnwindSafe for IoReader<R>where - R: UnwindSafe,

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ length: usize, + scratch: &mut Vec<u8>, +) -> Result<BufferedBytes<'de>, Error>

Reads exactly length bytes. Read more

Auto Trait Implementations§

§

impl<R> Freeze for IoReader<R>
where + R: Freeze,

§

impl<R> RefUnwindSafe for IoReader<R>
where + R: RefUnwindSafe,

§

impl<R> Send for IoReader<R>
where + R: Send,

§

impl<R> Sync for IoReader<R>
where + R: Sync,

§

impl<R> Unpin for IoReader<R>
where + R: Unpin,

§

impl<R> UnwindSafe for IoReader<R>
where + R: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
§

impl<R> ReadBytesExt for Rwhere - R: Read + ?Sized,

§

fn read_u8(&mut self) -> Result<u8, Error>

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> Result<i8, Error>

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16<T>(&mut self) -> Result<u16, Error>where - T: ByteOrder,

Reads an unsigned 16 bit integer from the underlying reader. Read more
§

fn read_i16<T>(&mut self) -> Result<i16, Error>where - T: ByteOrder,

Reads a signed 16 bit integer from the underlying reader. Read more
§

fn read_u24<T>(&mut self) -> Result<u32, Error>where - T: ByteOrder,

Reads an unsigned 24 bit integer from the underlying reader. Read more
§

fn read_i24<T>(&mut self) -> Result<i32, Error>where - T: ByteOrder,

Reads a signed 24 bit integer from the underlying reader. Read more
§

fn read_u32<T>(&mut self) -> Result<u32, Error>where - T: ByteOrder,

Reads an unsigned 32 bit integer from the underlying reader. Read more
§

fn read_i32<T>(&mut self) -> Result<i32, Error>where - T: ByteOrder,

Reads a signed 32 bit integer from the underlying reader. Read more
§

fn read_u48<T>(&mut self) -> Result<u64, Error>where - T: ByteOrder,

Reads an unsigned 48 bit integer from the underlying reader. Read more
§

fn read_i48<T>(&mut self) -> Result<i64, Error>where - T: ByteOrder,

Reads a signed 48 bit integer from the underlying reader. Read more
§

fn read_u64<T>(&mut self) -> Result<u64, Error>where - T: ByteOrder,

Reads an unsigned 64 bit integer from the underlying reader. Read more
§

fn read_i64<T>(&mut self) -> Result<i64, Error>where - T: ByteOrder,

Reads a signed 64 bit integer from the underlying reader. Read more
§

fn read_u128<T>(&mut self) -> Result<u128, Error>where - T: ByteOrder,

Reads an unsigned 128 bit integer from the underlying reader. Read more
§

fn read_i128<T>(&mut self) -> Result<i128, Error>where - T: ByteOrder,

Reads a signed 128 bit integer from the underlying reader. Read more
§

fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>where - T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader. Read more
§

fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>where - T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader. Read more
§

fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>where - T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader.
§

fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>where - T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader.
§

fn read_f32<T>(&mut self) -> Result<f32, Error>where - T: ByteOrder,

Reads a IEEE754 single-precision (4 bytes) floating point number from -the underlying reader. Read more
§

fn read_f64<T>(&mut self) -> Result<f64, Error>where - T: ByteOrder,

Reads a IEEE754 double-precision (8 bytes) floating point number from -the underlying reader. Read more
§

fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of unsigned 16 bit integers from the underlying -reader. Read more
§

fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of unsigned 32 bit integers from the underlying -reader. Read more
§

fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of unsigned 64 bit integers from the underlying -reader. Read more
§

fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of unsigned 128 bit integers from the underlying -reader. Read more
§

fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>

Reads a sequence of signed 8 bit integers from the underlying reader. Read more
§

fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of signed 16 bit integers from the underlying -reader. Read more
§

fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of signed 32 bit integers from the underlying -reader. Read more
§

fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of signed 64 bit integers from the underlying -reader. Read more
§

fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of signed 128 bit integers from the underlying -reader. Read more
§

fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of IEEE754 single-precision (4 bytes) floating -point numbers from the underlying reader. Read more
§

fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where - T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f32_into instead
DEPRECATED. Read more
§

fn read_f64_into<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of IEEE754 double-precision (8 bytes) floating -point numbers from the underlying reader. Read more
§

fn read_f64_into_unchecked<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>where - T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f64_into instead
DEPRECATED. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
§

impl<R> ReadBytesExt for R
where + R: Read + ?Sized,

§

fn read_u8(&mut self) -> Result<u8, Error>

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> Result<i8, Error>

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16<T>(&mut self) -> Result<u16, Error>
where + T: ByteOrder,

Reads an unsigned 16 bit integer from the underlying reader. Read more
§

fn read_i16<T>(&mut self) -> Result<i16, Error>
where + T: ByteOrder,

Reads a signed 16 bit integer from the underlying reader. Read more
§

fn read_u24<T>(&mut self) -> Result<u32, Error>
where + T: ByteOrder,

Reads an unsigned 24 bit integer from the underlying reader. Read more
§

fn read_i24<T>(&mut self) -> Result<i32, Error>
where + T: ByteOrder,

Reads a signed 24 bit integer from the underlying reader. Read more
§

fn read_u32<T>(&mut self) -> Result<u32, Error>
where + T: ByteOrder,

Reads an unsigned 32 bit integer from the underlying reader. Read more
§

fn read_i32<T>(&mut self) -> Result<i32, Error>
where + T: ByteOrder,

Reads a signed 32 bit integer from the underlying reader. Read more
§

fn read_u48<T>(&mut self) -> Result<u64, Error>
where + T: ByteOrder,

Reads an unsigned 48 bit integer from the underlying reader. Read more
§

fn read_i48<T>(&mut self) -> Result<i64, Error>
where + T: ByteOrder,

Reads a signed 48 bit integer from the underlying reader. Read more
§

fn read_u64<T>(&mut self) -> Result<u64, Error>
where + T: ByteOrder,

Reads an unsigned 64 bit integer from the underlying reader. Read more
§

fn read_i64<T>(&mut self) -> Result<i64, Error>
where + T: ByteOrder,

Reads a signed 64 bit integer from the underlying reader. Read more
§

fn read_u128<T>(&mut self) -> Result<u128, Error>
where + T: ByteOrder,

Reads an unsigned 128 bit integer from the underlying reader. Read more
§

fn read_i128<T>(&mut self) -> Result<i128, Error>
where + T: ByteOrder,

Reads a signed 128 bit integer from the underlying reader. Read more
§

fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>
where + T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader. Read more
§

fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>
where + T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader. Read more
§

fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>
where + T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader.
§

fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>
where + T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader.
§

fn read_f32<T>(&mut self) -> Result<f32, Error>
where + T: ByteOrder,

Reads a IEEE754 single-precision (4 bytes) floating point number from +the underlying reader. Read more
§

fn read_f64<T>(&mut self) -> Result<f64, Error>
where + T: ByteOrder,

Reads a IEEE754 double-precision (8 bytes) floating point number from +the underlying reader. Read more
§

fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of unsigned 16 bit integers from the underlying +reader. Read more
§

fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of unsigned 32 bit integers from the underlying +reader. Read more
§

fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of unsigned 64 bit integers from the underlying +reader. Read more
§

fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of unsigned 128 bit integers from the underlying +reader. Read more
§

fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>

Reads a sequence of signed 8 bit integers from the underlying reader. Read more
§

fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of signed 16 bit integers from the underlying +reader. Read more
§

fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of signed 32 bit integers from the underlying +reader. Read more
§

fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of signed 64 bit integers from the underlying +reader. Read more
§

fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of signed 128 bit integers from the underlying +reader. Read more
§

fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of IEEE754 single-precision (4 bytes) floating +point numbers from the underlying reader. Read more
§

fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>
where + T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f32_into instead
DEPRECATED. Read more
§

fn read_f64_into<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of IEEE754 double-precision (8 bytes) floating +point numbers from the underlying reader. Read more
§

fn read_f64_into_unchecked<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>
where + T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f64_into instead
DEPRECATED. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/reader/struct.SliceReader.html b/main/pot/reader/struct.SliceReader.html index ec25d808..cf7335bd 100644 --- a/main/pot/reader/struct.SliceReader.html +++ b/main/pot/reader/struct.SliceReader.html @@ -1,73 +1,73 @@ -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 -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 - Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · source§

fn chain<R>(self, next: R) -> Chain<Self, R>where - R: Read, - Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · source§

fn take(self, limit: u64) -> Take<Self>where - Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
source§

impl<'de> Reader<'de> for SliceReader<'de>

source§

fn buffered_read_bytes( +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 +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>) -> 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 Self
where + Self: Sized,

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

fn bytes(self) -> Bytes<Self>
where + Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · source§

fn chain<R>(self, next: R) -> Chain<Self, R>
where + R: Read, + Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · source§

fn take(self, limit: u64) -> Take<Self>
where + Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
source§

impl<'de> Reader<'de> for SliceReader<'de>

source§

fn buffered_read_bytes( &mut self, - length: usize, - _scratch: &mut Vec<u8> -) -> Result<BufferedBytes<'de>, Error>

Reads exactly length bytes. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for SliceReader<'a>

§

impl<'a> Send for SliceReader<'a>

§

impl<'a> Sync for SliceReader<'a>

§

impl<'a> Unpin for SliceReader<'a>

§

impl<'a> UnwindSafe for SliceReader<'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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ length: usize, + _scratch: &mut Vec<u8>, +) -> Result<BufferedBytes<'de>, Error>

Reads exactly length bytes. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for SliceReader<'a>

§

impl<'a> RefUnwindSafe for SliceReader<'a>

§

impl<'a> Send for SliceReader<'a>

§

impl<'a> Sync for SliceReader<'a>

§

impl<'a> Unpin for SliceReader<'a>

§

impl<'a> UnwindSafe for SliceReader<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
§

impl<R> ReadBytesExt for Rwhere - R: Read + ?Sized,

§

fn read_u8(&mut self) -> Result<u8, Error>

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> Result<i8, Error>

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16<T>(&mut self) -> Result<u16, Error>where - T: ByteOrder,

Reads an unsigned 16 bit integer from the underlying reader. Read more
§

fn read_i16<T>(&mut self) -> Result<i16, Error>where - T: ByteOrder,

Reads a signed 16 bit integer from the underlying reader. Read more
§

fn read_u24<T>(&mut self) -> Result<u32, Error>where - T: ByteOrder,

Reads an unsigned 24 bit integer from the underlying reader. Read more
§

fn read_i24<T>(&mut self) -> Result<i32, Error>where - T: ByteOrder,

Reads a signed 24 bit integer from the underlying reader. Read more
§

fn read_u32<T>(&mut self) -> Result<u32, Error>where - T: ByteOrder,

Reads an unsigned 32 bit integer from the underlying reader. Read more
§

fn read_i32<T>(&mut self) -> Result<i32, Error>where - T: ByteOrder,

Reads a signed 32 bit integer from the underlying reader. Read more
§

fn read_u48<T>(&mut self) -> Result<u64, Error>where - T: ByteOrder,

Reads an unsigned 48 bit integer from the underlying reader. Read more
§

fn read_i48<T>(&mut self) -> Result<i64, Error>where - T: ByteOrder,

Reads a signed 48 bit integer from the underlying reader. Read more
§

fn read_u64<T>(&mut self) -> Result<u64, Error>where - T: ByteOrder,

Reads an unsigned 64 bit integer from the underlying reader. Read more
§

fn read_i64<T>(&mut self) -> Result<i64, Error>where - T: ByteOrder,

Reads a signed 64 bit integer from the underlying reader. Read more
§

fn read_u128<T>(&mut self) -> Result<u128, Error>where - T: ByteOrder,

Reads an unsigned 128 bit integer from the underlying reader. Read more
§

fn read_i128<T>(&mut self) -> Result<i128, Error>where - T: ByteOrder,

Reads a signed 128 bit integer from the underlying reader. Read more
§

fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>where - T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader. Read more
§

fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>where - T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader. Read more
§

fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>where - T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader.
§

fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>where - T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader.
§

fn read_f32<T>(&mut self) -> Result<f32, Error>where - T: ByteOrder,

Reads a IEEE754 single-precision (4 bytes) floating point number from -the underlying reader. Read more
§

fn read_f64<T>(&mut self) -> Result<f64, Error>where - T: ByteOrder,

Reads a IEEE754 double-precision (8 bytes) floating point number from -the underlying reader. Read more
§

fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of unsigned 16 bit integers from the underlying -reader. Read more
§

fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of unsigned 32 bit integers from the underlying -reader. Read more
§

fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of unsigned 64 bit integers from the underlying -reader. Read more
§

fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of unsigned 128 bit integers from the underlying -reader. Read more
§

fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>

Reads a sequence of signed 8 bit integers from the underlying reader. Read more
§

fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of signed 16 bit integers from the underlying -reader. Read more
§

fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of signed 32 bit integers from the underlying -reader. Read more
§

fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of signed 64 bit integers from the underlying -reader. Read more
§

fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of signed 128 bit integers from the underlying -reader. Read more
§

fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of IEEE754 single-precision (4 bytes) floating -point numbers from the underlying reader. Read more
§

fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where - T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f32_into instead
DEPRECATED. Read more
§

fn read_f64_into<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>where - T: ByteOrder,

Reads a sequence of IEEE754 double-precision (8 bytes) floating -point numbers from the underlying reader. Read more
§

fn read_f64_into_unchecked<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>where - T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f64_into instead
DEPRECATED. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
§

impl<R> ReadBytesExt for R
where + R: Read + ?Sized,

§

fn read_u8(&mut self) -> Result<u8, Error>

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> Result<i8, Error>

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16<T>(&mut self) -> Result<u16, Error>
where + T: ByteOrder,

Reads an unsigned 16 bit integer from the underlying reader. Read more
§

fn read_i16<T>(&mut self) -> Result<i16, Error>
where + T: ByteOrder,

Reads a signed 16 bit integer from the underlying reader. Read more
§

fn read_u24<T>(&mut self) -> Result<u32, Error>
where + T: ByteOrder,

Reads an unsigned 24 bit integer from the underlying reader. Read more
§

fn read_i24<T>(&mut self) -> Result<i32, Error>
where + T: ByteOrder,

Reads a signed 24 bit integer from the underlying reader. Read more
§

fn read_u32<T>(&mut self) -> Result<u32, Error>
where + T: ByteOrder,

Reads an unsigned 32 bit integer from the underlying reader. Read more
§

fn read_i32<T>(&mut self) -> Result<i32, Error>
where + T: ByteOrder,

Reads a signed 32 bit integer from the underlying reader. Read more
§

fn read_u48<T>(&mut self) -> Result<u64, Error>
where + T: ByteOrder,

Reads an unsigned 48 bit integer from the underlying reader. Read more
§

fn read_i48<T>(&mut self) -> Result<i64, Error>
where + T: ByteOrder,

Reads a signed 48 bit integer from the underlying reader. Read more
§

fn read_u64<T>(&mut self) -> Result<u64, Error>
where + T: ByteOrder,

Reads an unsigned 64 bit integer from the underlying reader. Read more
§

fn read_i64<T>(&mut self) -> Result<i64, Error>
where + T: ByteOrder,

Reads a signed 64 bit integer from the underlying reader. Read more
§

fn read_u128<T>(&mut self) -> Result<u128, Error>
where + T: ByteOrder,

Reads an unsigned 128 bit integer from the underlying reader. Read more
§

fn read_i128<T>(&mut self) -> Result<i128, Error>
where + T: ByteOrder,

Reads a signed 128 bit integer from the underlying reader. Read more
§

fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>
where + T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader. Read more
§

fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>
where + T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader. Read more
§

fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>
where + T: ByteOrder,

Reads an unsigned n-bytes integer from the underlying reader.
§

fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>
where + T: ByteOrder,

Reads a signed n-bytes integer from the underlying reader.
§

fn read_f32<T>(&mut self) -> Result<f32, Error>
where + T: ByteOrder,

Reads a IEEE754 single-precision (4 bytes) floating point number from +the underlying reader. Read more
§

fn read_f64<T>(&mut self) -> Result<f64, Error>
where + T: ByteOrder,

Reads a IEEE754 double-precision (8 bytes) floating point number from +the underlying reader. Read more
§

fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of unsigned 16 bit integers from the underlying +reader. Read more
§

fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of unsigned 32 bit integers from the underlying +reader. Read more
§

fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of unsigned 64 bit integers from the underlying +reader. Read more
§

fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of unsigned 128 bit integers from the underlying +reader. Read more
§

fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>

Reads a sequence of signed 8 bit integers from the underlying reader. Read more
§

fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of signed 16 bit integers from the underlying +reader. Read more
§

fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of signed 32 bit integers from the underlying +reader. Read more
§

fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of signed 64 bit integers from the underlying +reader. Read more
§

fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of signed 128 bit integers from the underlying +reader. Read more
§

fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of IEEE754 single-precision (4 bytes) floating +point numbers from the underlying reader. Read more
§

fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>
where + T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f32_into instead
DEPRECATED. Read more
§

fn read_f64_into<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>
where + T: ByteOrder,

Reads a sequence of IEEE754 double-precision (8 bytes) floating +point numbers from the underlying reader. Read more
§

fn read_f64_into_unchecked<T>(&mut self, dst: &mut [f64]) -> Result<(), Error>
where + T: ByteOrder,

👎Deprecated since 1.2.0: please use read_f64_into instead
DEPRECATED. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/reader/trait.Reader.html b/main/pot/reader/trait.Reader.html index fd4f17bd..7ebe61af 100644 --- a/main/pot/reader/trait.Reader.html +++ b/main/pot/reader/trait.Reader.html @@ -1,18 +1,18 @@ -Reader in pot::reader - Rust

Trait pot::reader::Reader

source ·
pub trait Reader<'de>: ReadBytesExt {
+Reader in pot::reader - Rust

Trait pot::reader::Reader

source ·
pub trait Reader<'de>: ReadBytesExt {
     // Required method
     fn buffered_read_bytes(
         &mut self,
-        length: usize,
-        scratch: &mut Vec<u8>
-    ) -> Result<BufferedBytes<'de>, Error>;
+        length: usize,
+        scratch: &mut Vec<u8>,
+    ) -> Result<BufferedBytes<'de>, Error>;
 }
Expand description

A reader that can temporarily buffer bytes read.

-

Required Methods§

Required Methods§

source

fn buffered_read_bytes( &mut self, - length: usize, - scratch: &mut Vec<u8> -) -> Result<BufferedBytes<'de>, Error>

Reads exactly length bytes.

+ length: usize, + scratch: &mut Vec<u8>, +) -> Result<BufferedBytes<'de>, Error>

Reads exactly length bytes.

If the reader supports borrowing bytes, BufferedBytes::Data should be returned. Otherwise, the bytes will be read into scratch. scratch should only be assumed to be valid if BufferedBytes::Scratch is returned.

-

Implementors§

source§

impl<'de> Reader<'de> for SliceReader<'de>

source§

impl<'de, R: ReadBytesExt> Reader<'de> for IoReader<R>

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'de> Reader<'de> for SliceReader<'de>

source§

impl<'de, R: ReadBytesExt> Reader<'de> for IoReader<R>

\ No newline at end of file diff --git a/main/pot/ser/index.html b/main/pot/ser/index.html index 4af6e0cd..97d65014 100644 --- a/main/pot/ser/index.html +++ b/main/pot/ser/index.html @@ -1,2 +1,2 @@ -pot::ser - Rust

Module pot::ser

source ·
Expand description

Types for serializing pots.

-

Structs

\ No newline at end of file +pot::ser - Rust

Module pot::ser

source ·
Expand description

Types for serializing pots.

+

Structs§

\ No newline at end of file diff --git a/main/pot/ser/struct.MapSerializer.html b/main/pot/ser/struct.MapSerializer.html index b8c6a72f..32e7c995 100644 --- a/main/pot/ser/struct.MapSerializer.html +++ b/main/pot/ser/struct.MapSerializer.html @@ -1,30 +1,30 @@ -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>( +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>( &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 - 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 - 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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(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. Read more
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. Read more

Auto Trait Implementations§

§

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

§

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 T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/ser/struct.Serializer.html b/main/pot/ser/struct.Serializer.html index 3f6503bb..d45528c6 100644 --- a/main/pot/ser/struct.Serializer.html +++ b/main/pot/ser/struct.Serializer.html @@ -1,95 +1,100 @@ -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 +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.

+
source

pub fn new_with_compatibility( + output: W, + compatibility: Compatibility, +) -> 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 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>( + _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>( 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>( + _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>( 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 + _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 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 + _name: &'static str, + len: usize, +) -> 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( + _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( self, - _name: &'static str, - len: usize -) -> Result<Self::SerializeStruct>

Begin to serialize a struct like struct Rgb { r: u8, g: u8, b: u8 }. + _name: &'static str, + len: usize, +) -> 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 - 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 - 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 - W: Unpin,

§

impl<'a, W> !UnwindSafe for Serializer<'a, W>

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(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 + 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> Freeze for Serializer<'a, W>
where + W: Freeze,

§

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 + W: Unpin,

§

impl<'a, W> !UnwindSafe for Serializer<'a, W>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/ser/struct.SymbolMap.html b/main/pot/ser/struct.SymbolMap.html index c71c51c7..22870909 100644 --- a/main/pot/ser/struct.SymbolMap.html +++ b/main/pot/ser/struct.SymbolMap.html @@ -1,47 +1,49 @@ -SymbolMap in pot::ser - Rust

Struct pot::ser::SymbolMap

source ·
pub struct SymbolMap { /* private fields */ }
Expand description

A list of previously serialized symbols.

-

Implementations§

source§

impl SymbolMap

source

pub const fn new() -> Self

Returns a new, empty symbol map.

-
source

pub fn serializer_for<W: WriteBytesExt>( +SymbolMap in pot::ser - Rust

Struct pot::ser::SymbolMap

source ·
pub struct SymbolMap { /* private fields */ }
Expand description

A list of previously serialized symbols.

+

Implementations§

source§

impl SymbolMap

source

pub const fn new() -> Self

Returns a new, empty symbol map.

+
source

pub const fn with_compatibility(self, compatibility: Compatibility) -> Self

Sets the compatibility mode for serializing and returns self.

+
source

pub fn set_compatibility(&mut self, compatibility: Compatibility)

Sets the compatibility mode for serializing.

+
source

pub fn serializer_for<W: WriteBytesExt>( &mut self, - output: W + output: W, ) -> Result<Serializer<'_, W>>

Returns a serializer that writes into output and persists symbols into self.

-
source

pub fn serialize_to<T, W>(&mut self, writer: W, value: &T) -> Result<()>where - W: Write, - T: Serialize,

Serializes value into writer while persisting symbols into self.

-
source

pub fn serialize_to_vec<T>(&mut self, value: &T) -> Result<Vec<u8>>where - T: Serialize,

Serializes value into a new Vec<u8> while persisting symbols into +

source

pub fn serialize_to<T, W>(&mut self, writer: W, value: &T) -> Result<()>
where + W: Write, + T: Serialize,

Serializes value into writer while persisting symbols into self.

+
source

pub fn serialize_to_vec<T>(&mut self, value: &T) -> Result<Vec<u8>>
where + T: Serialize,

Serializes value into a new Vec<u8> while persisting symbols into self.

-
source

pub fn insert(&mut self, symbol: &str) -> bool

Inserts symbol into this map.

+
source

pub fn insert(&mut self, symbol: &str) -> bool

Inserts symbol into this map.

Returns true if this symbol had not previously been registered. Returns false if the symbol was already included in the map.

-
source

pub fn len(&self) -> usize

Returns the number of entries in this map.

-
source

pub fn is_empty(&self) -> bool

Returns true if the map has no entries.

-
source

pub fn populate_from<T>( +

source

pub fn len(&self) -> usize

Returns the number of entries in this map.

+
source

pub fn is_empty(&self) -> bool

Returns true if the map has no entries.

+
source

pub fn populate_from<T>( &mut self, - value: &T -) -> Result<usize, SymbolMapPopulationError>where - T: Serialize,

Adds all symbols encountered in value.

+ value: &T, +) -> Result<usize, SymbolMapPopulationError>
where + T: Serialize,

Adds all symbols encountered in value.

Returns the number of symbols added.

Due to how serde works, this function can only encounter symbols that are being used. For example, if T is an enum, only variant being passed in will have its name, and additional calls for each variant will be needed to ensure every symbol is added.

-

Trait Implementations§

source§

impl Debug for SymbolMap

source§

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

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

impl Default for SymbolMap

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for SymbolMap

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 Serialize for SymbolMap

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

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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl Debug for SymbolMap

source§

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

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

impl Default for SymbolMap

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for SymbolMap

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 Serialize for SymbolMap

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

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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 +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

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 T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/main/pot/ser/struct.SymbolMapPopulationError.html b/main/pot/ser/struct.SymbolMapPopulationError.html index 489dd478..6c3d3612 100644 --- a/main/pot/ser/struct.SymbolMapPopulationError.html +++ b/main/pot/ser/struct.SymbolMapPopulationError.html @@ -1,22 +1,20 @@ -SymbolMapPopulationError in pot::ser - Rust
pub struct SymbolMapPopulationError(_);
Expand description

A Serialize implementation returned an error.

-

Trait Implementations§

source§

impl Debug for SymbolMapPopulationError

source§

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

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

impl Display for SymbolMapPopulationError

source§

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

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

impl Error for SymbolMapPopulationError

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 Error for SymbolMapPopulationError

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 - 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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+SymbolMapPopulationError in pot::ser - Rust

Struct pot::ser::SymbolMapPopulationError

source ·
pub struct SymbolMapPopulationError(/* private fields */);
Expand description

A Serialize implementation returned an error.

+

Trait Implementations§

source§

impl Debug for SymbolMapPopulationError

source§

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

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

impl Display for SymbolMapPopulationError

source§

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

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

impl Error for SymbolMapPopulationError

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, request: &mut Request<'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 SymbolMapPopulationError

source§

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

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

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<E> Provider for Ewhere - E: Error + ?Sized,

source§

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

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to -provide by using demand. Read more
source§

impl<T> ToString for Twhere - T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/sidebar-items.js b/main/pot/sidebar-items.js index f14fde17..8d3e7f86 100644 --- a/main/pot/sidebar-items.js +++ b/main/pot/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":["Error","Value","ValueError"],"fn":["from_reader","from_slice","to_vec","to_writer"],"mod":["de","format","reader","ser"],"struct":["Config","OwnedValue","ValueIter"],"type":["Result"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":["Compatibility","Error","Value","ValueError"],"fn":["from_reader","from_slice","to_vec","to_writer"],"mod":["de","format","reader","ser"],"struct":["Config","OwnedValue","ValueIter"],"type":["Result"]}; \ No newline at end of file diff --git a/main/pot/struct.Config.html b/main/pot/struct.Config.html index f6b0c8bd..e4d82482 100644 --- a/main/pot/struct.Config.html +++ b/main/pot/struct.Config.html @@ -1,33 +1,35 @@ -Config in pot - Rust

Struct pot::Config

source ·
pub struct Config { /* private fields */ }
Expand description

Serialization and deserialization configuration.

-

Implementations§

source§

impl Config

source

pub const fn allocation_budget(self, budget: usize) -> Self

Sets the maximum number of bytes able to be allocated. This is not +Config in pot - Rust

Struct pot::Config

source ·
pub struct Config { /* private fields */ }
Expand description

Serialization and deserialization configuration.

+

Implementations§

source§

impl Config

source

pub const fn new() -> Self

Returns the default configuration.

+
source

pub const fn allocation_budget(self, budget: usize) -> Self

Sets the maximum number of bytes able to be allocated. This is not guaranteed to be perfectly accurate, due to the limitations of serde deserializers. Pot can keep track of how many bytes it thinks its allocating, but a deserializer can always allocate more memory than Pot 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.

-
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 +

The default allocation budget is usize::MAX.

+
source

pub const fn compatibility(self, compatibilty: Compatibility) -> Self

Sets the compatibility mode for serializing and returns self.

+
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.

+
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 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, - 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 - 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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+
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, + 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§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/struct.OwnedValue.html b/main/pot/struct.OwnedValue.html index fdcbae1a..d6a3b865 100644 --- a/main/pot/struct.OwnedValue.html +++ b/main/pot/struct.OwnedValue.html @@ -1,13 +1,13 @@ -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>>( - &'de self -) -> Result<T, ValueError>

Attempts to create an instance of T from this value.

+

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.

use pot::Value;
 use serde_derive::{Deserialize, Serialize};
@@ -22,7 +22,7 @@
 let serialized = Value::from_serialize(&original)?;
 let deserialized: Vec<Example> = serialized.deserialize_as()?;
 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);
@@ -35,11 +35,11 @@
 
 // For all other types, having a length of 0 will result in is_empty returning true.
 assert_eq!(Value::from(Vec::<u8>::new()).is_empty(), true);
-assert_eq!(Value::from(b"").is_empty(), true);
+assert_eq!(Value::from(b"").is_empty(), true);
 assert_eq!(Value::from(vec![0_u8]).is_empty(), false);
 
-assert_eq!(Value::from("").is_empty(), true);
-assert_eq!(Value::from("hi").is_empty(), false);
+assert_eq!(Value::from("").is_empty(), true);
+assert_eq!(Value::from("hi").is_empty(), false);
 
 assert_eq!(Value::Sequence(Vec::new()).is_empty(), true);
 assert_eq!(Value::from(vec![Value::None]).is_empty(), false);
@@ -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);
@@ -69,11 +69,11 @@
 
 // For all other types, as_bool() returns the result of `!is_empty()`.
 assert_eq!(Value::from(Vec::<u8>::new()).as_bool(), false);
-assert_eq!(Value::from(b"").as_bool(), false);
+assert_eq!(Value::from(b"").as_bool(), false);
 assert_eq!(Value::from(vec![0_u8]).as_bool(), true);
 
-assert_eq!(Value::from("").as_bool(), false);
-assert_eq!(Value::from("hi").as_bool(), true);
+assert_eq!(Value::from("").as_bool(), false);
+assert_eq!(Value::from("hi").as_bool(), true);
 
 assert_eq!(Value::Sequence(Vec::new()).as_bool(), false);
 assert_eq!(Value::from(vec![Value::None]).as_bool(), true);
@@ -83,47 +83,47 @@
     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) -> ValueIter<'_>

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

source

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

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<'a> From<&'a Value<'a>> for OwnedValue

source§

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

Converts to this type from the input type.
source§

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

source§

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

Converts to this type from the input type.
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 - 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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+
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<'a> From<&'a Value<'a>> for OwnedValue

source§

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

Converts to this type from the input type.
source§

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

source§

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

Converts to this type from the input type.
source§

impl PartialEq 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 T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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 +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

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 T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/main/pot/struct.ValueIter.html b/main/pot/struct.ValueIter.html index e339fc4f..a25638bd 100644 --- a/main/pot/struct.ValueIter.html +++ b/main/pot/struct.ValueIter.html @@ -1,209 +1,213 @@ -ValueIter in pot - Rust

Struct pot::ValueIter

source ·
pub struct ValueIter<'a>(_);
Expand description

An iterator over values contained within a Value.

-

Trait Implementations§

source§

impl<'a> DoubleEndedIterator for ValueIter<'a>

source§

fn next_back(&mut self) -> Option<Self::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.37.0 · source§

fn nth_back(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element from the end of the iterator. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> Rwhere - Self: Sized, - F: FnMut(B, Self::Item) -> R, - R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes -elements starting from the back of the iterator. Read more
1.27.0 · source§

fn rfold<B, F>(self, init: B, f: F) -> Bwhere - Self: Sized, - F: FnMut(B, Self::Item) -> B,

An iterator method that reduces the iterator’s elements to a single, -final value, starting from the back. Read more
1.27.0 · source§

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

impl<'a> ExactSizeIterator for ValueIter<'a>

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<'a> Iterator for ValueIter<'a>

§

type Item = &'a Value<'a>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( - &mut self -) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · source§

fn count(self) -> usizewhere - Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>where - Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>where - Self: Sized,

Creates an iterator starting at the same point, but stepping by -the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>where - Self: Sized, - U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where - Self: Sized, - U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>where - Self: Sized, - G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator -between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>where - Self: Sized, - F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each -element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)where - Self: Sized, - F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element -should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where - Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>where - Self: Sized,

Creates an iterator which gives the current iteration count as well as -the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>where - Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +ValueIter in pot - Rust

Struct pot::ValueIter

source ·
pub struct ValueIter<'a>(/* private fields */);
Expand description

An iterator over values contained within a Value.

+

Trait Implementations§

source§

impl<'a> DoubleEndedIterator for ValueIter<'a>

source§

fn next_back(&mut self) -> Option<Self::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.37.0 · source§

fn nth_back(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element from the end of the iterator. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes +elements starting from the back of the iterator. Read more
1.27.0 · source§

fn rfold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

An iterator method that reduces the iterator’s elements to a single, +final value, starting from the back. Read more
1.27.0 · source§

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

impl<'a> ExactSizeIterator for ValueIter<'a>

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<'a> Iterator for ValueIter<'a>

§

type Item = &'a Value<'a>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk<const N: usize>( + &mut self, +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · source§

fn count(self) -> usize
where + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where + Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where + Self: Sized, + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See -their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>where - Self: Sized, - P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>where - Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>where - Self: Sized,

Creates an iterator that yields the first n elements, or fewer -if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where - Self: Sized, - F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but -unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where - Self: Sized, - U: IntoIterator, - F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>where - Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>where - Self: Sized, - F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

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

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> Bwhere - B: FromIterator<Self::Item>, - Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut Ewhere - E: Extend<Self::Item>, - Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)where - Self: Sized, - B: Default + Extend<Self::Item>, - F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn partition_in_place<'a, T, P>(self, predicate: P) -> usizewhere +their documentation for more information. Read more

1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

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

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where + B: FromIterator<Self::Item>, + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where + Self: Sized, + B: Default + Extend<Self::Item>, + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where T: 'a, - Self: Sized + DoubleEndedIterator<Item = &'a mut T>, - P: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, + Self: Sized + DoubleEndedIterator<Item = &'a mut T>, + P: FnMut(&T) -> bool,
🔬This is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, such that all those that return true precede all those that return false. -Returns the number of true elements found. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> boolwhere - Self: Sized, - P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, -such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> Rwhere - Self: Sized, - F: FnMut(B, Self::Item) -> R, - R: Try<Output = B>,

An iterator method that applies a function as long as it returns -successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> Rwhere - Self: Sized, - F: FnMut(Self::Item) -> R, - R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the -iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> Bwhere - Self: Sized, - F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, -returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>where - Self: Sized, - F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing -operation. Read more
source§

fn try_reduce<F, R>( +Returns the number of true elements found. Read more

source§

fn is_partitioned<P>(self, predicate: P) -> bool
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( &mut self, - f: F -) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryTypewhere - Self: Sized, - F: FnMut(Self::Item, Self::Item) -> R, - R: Try<Output = Self::Item>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the -closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> boolwhere - Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> boolwhere - Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>where - Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns -the first non-none result. Read more
source§

fn try_find<F, R>( + f: F, +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( &mut self, - f: F -) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryTypewhere - Self: Sized, - F: FnMut(&Self::Item) -> R, - R: Try<Output = bool>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns -the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>where - Self: Sized, - P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn rposition<P>(&mut self, predicate: P) -> Option<usize>where - P: FnMut(Self::Item) -> bool, - Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its -index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>where - B: Ord, - Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the -specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>where - Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the -specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>where - B: Ord, - Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the -specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>where - Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the -specified comparison function. Read more
1.0.0 · source§

fn rev(self) -> Rev<Self>where - Self: Sized + DoubleEndedIterator,

Reverses an iterator’s direction. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where - FromA: Default + Extend<A>, - FromB: Default + Extend<B>, - Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>where - T: 'a + Copy, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>where - T: 'a + Clone, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> Swhere - Self: Sized, - S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> Pwhere - Self: Sized, - P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Orderingwhere - Self: Sized, - I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>where - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Lexicographically compares the PartialOrd elements of -this Iterator with those of another. The comparison works like short-circuit + f: F, +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,
🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn rposition<P>(&mut self, predicate: P) -> Option<usize>
where + P: FnMut(Self::Item) -> bool, + Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its +index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn rev(self) -> Rev<Self>
where + Self: Sized + DoubleEndedIterator,

Reverses an iterator’s direction. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. -As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where - Self: Sized, - I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are equal to those of -another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> boolwhere - Self: Sized, - I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of -another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are not equal to those of -another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> boolwhere - Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> boolwhere - Self: Sized, - F: FnMut(Self::Item) -> K, - K: PartialOrd<K>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction -function. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for ValueIter<'a>

§

impl<'a> Send for ValueIter<'a>

§

impl<'a> Sync for ValueIter<'a>

§

impl<'a> Unpin for ValueIter<'a>

§

impl<'a> UnwindSafe for ValueIter<'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.

-
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an -Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> bool,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ValueIter<'a>

§

impl<'a> RefUnwindSafe for ValueIter<'a>

§

impl<'a> Send for ValueIter<'a>

§

impl<'a> Sync for ValueIter<'a>

§

impl<'a> Unpin for ValueIter<'a>

§

impl<'a> UnwindSafe for ValueIter<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<I> IntoIterator for Iwhere - I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/main/pot/type.Result.html b/main/pot/type.Result.html index 837c4372..17bcd166 100644 --- a/main/pot/type.Result.html +++ b/main/pot/type.Result.html @@ -1,2 +1,7 @@ -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 +Result in pot - Rust

Type Alias pot::Result

source ·
pub type Result<T, E = Error> = Result<T, E>;
Expand description

A result alias that returns Error.

+

Aliased Type§

enum Result<T, E = Error> {
+    Ok(T),
+    Err(E),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(E)

Contains the error value

+
\ No newline at end of file diff --git a/main/search-index.js b/main/search-index.js index 8f445c13..20842b30 100644 --- a/main/search-index.js +++ b/main/search-index.js @@ -1,6 +1,6 @@ -var searchIndex = JSON.parse('{\ -"pot":{"doc":"A concise storage format, written for BonsaiDb.","t":"NNDNNENNNNNNNNNNNNNDGNNNNNNNNNNEEDLLLLLLLLLLLLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLFLLLLLLLLLLLLLLLAALLLLLLLLLLLFFLLLLLLLLLLLLLLLLLLLMMNDNDGDELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDNNNNNNNNDNNNDNENNNNENENNNNNNDMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMFFLLFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFFFFFFFFFFFFFFFFFLLFFFFFFFFENDINDLLLLLLLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDDDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL","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","UnknownSpecial","UnknownSymbol","UnsupportedByteCount","Value","ValueError","ValueIter","allocation_budget","as_bool","as_bytes","as_float","as_integer","as_str","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","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","from","from","from","from_iter","from_iter","from_mappings","from_reader","from_sequence","from_serialize","from_slice","into","into","into","into","into","into","into_iter","into_static","is_empty","len","mappings","next","next_back","provide","provide","reader","ser","serialize","serialize","serialize","serialize_into","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_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","values","kind","value","Data","Deserializer","InList","SymbolList","SymbolMap","SymbolMapRef","SymbolStr","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","default","deref","deserialize","deserialize_any","deserialize_bool","deserialize_byte_buf","deserialize_bytes","deserialize_char","deserialize_enum","deserialize_f32","deserialize_f64","deserialize_from","deserialize_from","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_slice","deserialize_slice","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","deserializer_for","deserializer_for_slice","deserializer_for_slice","end_of_input","fmt","fmt","fmt","from","from","from","from","get","into","into","into","into","is_empty","is_human_readable","len","new","newtype_variant_seed","push","push_borrowed","serialize","struct_variant","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","tuple_variant","type_id","type_id","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","UnknownSpecial","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","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","eq","eq","eq","eq","equivalent","equivalent","equivalent","fmt","fmt","fmt","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","from_u8","into","into","into","into","into","into","into","is_zero","is_zero","kind","nucleus","read_atom","read_atom_header","read_from","read_from","read_header","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","try_from","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","try_into","type_id","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","BufferedBytes","Data","IoReader","Reader","Scratch","SliceReader","as_slice","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","buffered_read_bytes","buffered_read_bytes","buffered_read_bytes","fmt","fmt","from","from","from","from","into","into","into","is_empty","len","read","read","read_exact","read_exact","read_to_end","read_to_string","read_vectored","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","MapSerializer","Serializer","SymbolMap","SymbolMapPopulationError","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","custom","default","deserialize","end","end","end","end","end","end","end","fmt","fmt","fmt","fmt","from","from","from","from","insert","into","into","into","into","is_empty","is_human_readable","len","new","new","populate_from","provide","serialize","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_to","serialize_to_vec","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","to_string","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id"],"q":[[0,"pot"],[173,"pot::ValueError"],[175,"pot::de"],[269,"pot::format"],[447,"pot::reader"],[490,"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 (()).","An unknown Special was encountered.","A requested symbol id was not found.","An unsupported byte count for a numeric type was …","A Pot-encoded value. This type can be used to deserialize …","An error from deserializing a type using …","An iterator over values contained within a Value.","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 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).","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 symbol that has been borrowed from the data being …","Deserializer for the Pot format.","A symbol that is stored inside of the SymbolList.","A collection of symbols accumulated during deserialization.","An alias to a SymbolList with a static lifetime. This type …","A reference to a SymbolList.","A symbol stored in a SymbolList.","","","","","","","","","","","","","","","","","","","","Deserializes T from reader.","Deserializes T from reader.","","","","","","","","","","","","Deserializes T from slice.","Deserializes T from slice.","","","","","","","","","","","","","Returns a deserializer for reader.","Returns a deserializer for reader.","Returns a deserializer for slice that reuses symbol ids.","Returns a deserializer for slice that reuses symbol ids.","Returns true if the input has been consumed completely.","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Return the symbol stored at index, or None if index is out …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if there are no symbols in this list.","","Returns the number of entries in the symbol list.","Returns a new, empty symbol list.","","Push a symbol that cannot be borrowed from the …","Push a symbol that has been borrowed from the …","","","","","","","","","","","","","","","","","","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.","An unknown Special was encountered.","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.","","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).","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.","Bytes that have been read into a buffer.","The bytes that have been read can be borrowed from the …","A reader over ReadBytesExt.","A reader that can temporarily buffer bytes read.","The bytes that have been read have been stored in the …","Reads data from a slice.","Resolves the bytes to a byte slice.","","","","","","","Reads exactly length bytes.","","","","","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 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.","A Serialize implementation returned an error.","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Inserts symbol into this map.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if the map has no entries.","","Returns the number of entries in this map.","Returns a new serializer outputting written bytes into …","Returns a new, empty symbol map.","Adds all symbols encountered in value.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Serializes value into writer while persisting symbols into …","Serializes value into a new Vec<u8> while persisting …","","","","","","","","","","","","","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,13,13,0,0,0,1,3,3,3,3,3,43,13,3,11,14,1,43,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,43,13,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,11,11,14,1,3,3,3,0,3,3,0,43,13,3,11,14,1,43,3,3,43,3,43,43,13,14,0,0,3,11,1,1,3,11,1,3,13,3,14,0,0,43,13,3,11,14,1,43,13,3,11,14,1,43,13,3,11,14,1,3,74,74,50,0,50,0,0,0,0,53,50,57,49,53,50,57,49,49,50,51,53,53,53,53,53,53,53,53,51,49,53,53,53,53,53,53,53,53,53,53,53,51,49,53,53,53,53,53,53,53,53,53,53,53,53,51,49,51,49,53,53,57,49,53,50,57,49,49,53,50,57,49,49,53,49,49,53,49,49,51,53,53,50,57,49,53,50,57,49,53,53,50,57,49,53,53,0,62,59,62,60,62,60,62,60,0,59,62,59,0,62,0,59,60,62,60,0,59,0,59,59,60,59,60,62,0,61,9,8,9,8,9,9,9,9,9,9,8,9,9,9,9,9,59,60,24,9,61,8,62,59,60,24,9,61,8,62,59,24,9,8,59,24,9,8,59,24,9,8,59,24,9,59,60,24,24,9,9,61,8,8,62,59,60,24,9,9,9,9,9,9,9,9,9,9,9,61,8,8,8,62,59,59,60,24,9,61,8,62,9,8,61,61,0,0,9,8,0,59,24,9,8,24,9,8,59,60,60,24,9,61,8,62,59,60,24,9,61,8,62,59,60,24,9,61,8,62,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,65,0,0,65,0,65,56,55,65,56,55,65,52,56,55,56,65,56,56,55,65,56,55,65,56,56,56,55,56,55,55,55,55,56,55,65,56,55,65,56,55,65,0,0,0,0,69,70,68,67,69,70,68,67,67,68,68,69,69,69,69,70,70,70,69,68,67,67,69,70,68,67,68,69,70,68,67,68,69,68,69,68,68,67,68,69,69,69,69,69,69,69,69,69,70,70,69,69,69,69,69,70,69,69,69,69,69,69,69,69,69,68,68,69,69,69,69,69,69,69,69,69,69,69,70,68,67,69,70,68,67,69,70,68,67,69,70,68,67],"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,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,13],[[]],[27,3],[[[28,[5]]],3],[[[6,[5]]],3],[29,3],[[[30,[3]]],3],[[]],[5,3],[31,3],[32,3],[33,3],[4,3],[[[7,[3]]],3],[34,3],[35,3],[36,3],[37,3],[[[30,[5]]],3],[38,3],[39,3],[40,3],[10,3],[[],3],[30,3],[3,11],[[]],[3,11],[[]],[[]],[41,3],[41,3],[41,3],[19,[[18,[20]]]],[41,3],[42,[[16,[3,14]]]],[[[6,[5]]],[[18,[17]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[3,3],[3,4],[43,2],[3,44],[43,7],[43,7],[45],[45],0,0,[[3,46],16],[[11,46],16],[[1,42],[[18,[[30,[5]]]]]],[[1,42,47],18],[[]],[[]],[[]],[3,3],[[],33],[[],33],[[],33],[42,[[18,[[30,[5]]]]]],[[42,47],18],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],48],[[],48],[[],48],[[],48],[[],48],[[],48],[3,43],0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],49],[50],[15,[[16,[51]]]],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],10,[6,[10]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[51,19],[[18,[17]]]],[[49,19],[[18,[17]]]],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],10,54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[51,[6,[5]]],[[18,[17]]]],[[49,[6,[5]]],[[18,[17]]]],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],10,[6,[10]],54],18],[[[53,[52]],2,54],18],[[[53,[52]],10,2,54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],54],18],[[[53,[52]],10,54],18],[[51,19],[[18,[[53,[[55,[19]]]]]]]],[[49,19],[[18,[[53,[[55,[19]]]]]]]],[[51,[6,[5]]],[[18,[[53,[56]]]]]],[[49,[6,[5]]],[[18,[[53,[56]]]]]],[[[53,[56]]],4],[[[53,[52]],21],22],[[57,21],22],[[49,21],22],[[]],[[]],[[]],[[]],[[49,2],[[7,[50]]]],[[]],[[]],[[]],[[]],[49,4],[[[53,[52]]],4],[49,2],[[],49],[[[53,[52]],58],18],[[49,10]],[[49,10]],[[51,46],16],[[[53,[52]],[6,[10]],54],18],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[[53,[52]],2,54],18],[[],48],[[],48],[[],48],[[],48],[[[53,[52]]],18],[[[53,[52]],58],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,0,[9,[[16,[32,13]]]],[8,[[16,[32,13]]]],[9,[[16,[34,13]]]],[8,34],[9,[[16,[8,13]]]],[9,[[16,[38,13]]]],[9,[[16,[37,13]]]],[9,[[16,[31,13]]]],[9,[[16,[27,13]]]],[9,[[16,[36,13]]]],[8,[[16,[9,13]]]],[9,[[16,[29,13]]]],[9,[[16,[40,13]]]],[9,[[16,[39,13]]]],[9,[[16,[35,13]]]],[9,[[16,[5,13]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[59,59],[24,24],[9,9],[8,8],[[]],[[]],[[]],[[]],[[59,59],4],[[24,24],4],[[9,9],4],[[8,8],4],[[],4],[[],4],[[],4],[[59,21],22],[[60,21],22],[[24,21],22],[[24,21],22],[[9,21],22],[[9,21],22],[[61,21],22],[[8,21],22],[[8,21],22],[[62,21],22],[[]],[[]],[[]],[40,9],[37,9],[[]],[27,9],[5,9],[31,9],[38,9],[35,9],[39,9],[29,9],[36,9],[[]],[32,8],[[]],[34,8],[[]],[5,[[16,[59,13]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[9,4],[8,4],0,0,[[52,2,[30,[5]]],[[16,[61,13]]]],[63,[[16,[13]]]],[[59,2,63],[[16,[9,13]]]],[[59,2,63],[[16,[8,13]]]],[63,[[16,[5,13]]]],[[]],[[]],[[]],[[]],[[],33],[[],33],[[],33],[[],16],[35,[[16,[60]]]],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],48],[[],48],[[],48],[[],48],[[],48],[[],48],[[],48],[[47,59,35],[[64,[2]]]],[[47,4],[[64,[2]]]],[[47,[6,[5]]],[[64,[2]]]],[[47,32],[[64,[2]]]],[[47,34],[[64,[2]]]],[[47,5],[[64,[2]]]],[[47,38],[[64,[2]]]],[[47,37],[[64,[2]]]],[[47,31],[[64,[2]]]],[[47,31],[[64,[2]]]],[[47,27],[[64,[2]]]],[[47,27],[[64,[2]]]],[[47,36],[[64,[2]]]],[47,[[64,[2]]]],[47,[[64,[2]]]],[[47,60],[[64,[2]]]],[[47,10],[[64,[2]]]],[[9,47],[[64,[2]]]],[[8,47],[[64,[2]]]],[[47,29],[[64,[2]]]],[[47,40],[[64,[2]]]],[[47,39],[[64,[2]]]],[[47,39],[[64,[2]]]],[[47,35],[[64,[2]]]],[[47,35],[[64,[2]]]],[[47,5],[[64,[2]]]],[47,[[64,[2]]]],0,0,0,0,0,0,[[65,[6,[5]]],[[6,[5]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[2,[30,[5]]],[[16,[65,13]]]],[[56,2,[30,[5]]],[[16,[65,13]]]],[[[55,[63]],2,[30,[5]]],[[16,[65,13]]]],[[56,21],22],[[65,21],22],[[]],[[[6,[5]]],56],[[]],[[]],[[]],[[]],[[]],[56,4],[56,2],[[56,[6,[5]]],[[64,[2]]]],[[[55,[63]],[6,[5]]],[[64,[2]]]],[[56,[6,[5]]],64],[[[55,[63]],[6,[5]]],64],[[[55,[63]],[30,[5]]],[[64,[2]]]],[[[55,[63]],33],[[64,[2]]]],[[[55,[63]],[6,[66]]],[[64,[2]]]],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],48],[[],48],[[],48],0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[12,67],[[],68],[15,[[16,[68]]]],[[[69,[47]]],18],[[[69,[47]]],18],[[[69,[47]]],18],[[[69,[47]]],18],[[[70,[47]]],18],[[[70,[47]]],18],[[[70,[47]]],18],[[[69,[47]],21],22],[[68,21],22],[[67,21],22],[[67,21],22],[[]],[[]],[[]],[[]],[[68,10],4],[[]],[[]],[[]],[[]],[68,4],[[[69,[47]]],4],[68,2],[47,[[18,[[69,[47]]]]]],[[],68],[[68,42],[[18,[2,67]]]],[45],[[68,46],16],[[[69,[47]],4],18],[[[69,[47]],[6,[5]]],18],[[[69,[47]],71],18],[[[69,[47]],[0,[72,42]]],18],[[[69,[47]],[0,[72,42]]],18],[[[69,[47]],32],18],[[[69,[47]],34],18],[[[69,[47]],[0,[72,42]]],18],[[[69,[47]],[0,[72,42]]],18],[[[70,[47]],10,[0,[72,42]]],18],[[[70,[47]],10,[0,[72,42]]],18],[[[69,[47]],38],18],[[[69,[47]],37],18],[[[69,[47]],31],18],[[[69,[47]],27],18],[[[69,[47]],36],18],[[[70,[47]],[0,[72,42]]],18],[[[69,[47]],[7,[2]]],18],[[[69,[47]],10,[0,[72,42]]],18],[[[69,[47]],10,39,10,[0,[72,42]]],18],[[[69,[47]]],18],[[[69,[47]],[7,[2]]],18],[[[69,[47]],[0,[72,42]]],18],[[[69,[47]],10],18],[[[69,[47]],10,2],18],[[[69,[47]],10,39,10,2],18],[[68,73,42],18],[[68,42],[[18,[[30,[5]]]]]],[[[69,[47]],2],18],[[[69,[47]],10,2],18],[[[69,[47]],10,39,10,2],18],[[[69,[47]],29],18],[[[69,[47]],40],18],[[[69,[47]],39],18],[[[69,[47]],35],18],[[[69,[47]],5],18],[[[69,[47]]],18],[[[69,[47]],10],18],[[[69,[47]],10,39,10],18],[[[70,[47]],[0,[72,42]]],18],[[68,47],[[18,[[69,[47]]]]]],[[],33],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],16],[[],48],[[],48],[[],48],[[],48]],"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,"UnknownSpecial"],[3,"Utf8Error"],[3,"Error"],[15,"i64"],[15,"array"],[15,"u128"],[3,"Vec"],[15,"i32"],[15,"f32"],[3,"String"],[15,"f64"],[15,"u64"],[15,"i8"],[15,"i16"],[15,"i128"],[15,"u32"],[15,"u16"],[8,"IntoIterator"],[8,"Serialize"],[3,"ValueIter"],[3,"Iter"],[3,"Demand"],[8,"Serializer"],[8,"WriteBytesExt"],[3,"TypeId"],[3,"SymbolList"],[4,"SymbolStr"],[6,"SymbolMap"],[8,"Reader"],[3,"Deserializer"],[8,"Visitor"],[3,"IoReader"],[3,"SliceReader"],[3,"SymbolMapRef"],[8,"DeserializeSeed"],[4,"Kind"],[4,"Special"],[3,"Atom"],[4,"Nucleus"],[8,"ReadBytesExt"],[6,"Result"],[4,"BufferedBytes"],[3,"IoSliceMut"],[3,"SymbolMapPopulationError"],[3,"SymbolMap"],[3,"Serializer"],[3,"MapSerializer"],[15,"char"],[8,"Sized"],[8,"Write"],[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)}; -if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; +var searchIndex = new Map(JSON.parse('[\ +["pot",{"t":"PPGFPPPGPPPPPPPPPPPPPPPFIPPPPPPPPPPPGGFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNHNNNNNNNNNNNNNNNCCNNNNNNNNNNNNHHNNNNNNNNNNNNNNNNNNNNNNOOPFPFIFGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFPPPPPPPPFPPPFPGPPPPGPGPPPPPPFONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOHHNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHHHHHHHHHHHHHHHHHNNHHHHHHHHGPFKPFNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["Bool","Bytes","Compatibility","Config","Custom","Eof","Err","Error","Expected","Float","Full","ImpreciseCastWouldLoseData","IncompatibleVersion","Integer","InvalidAtomHeader","InvalidKind","InvalidUtf8","Io","Mappings","Message","None","NotAPot","Ok","OwnedValue","Result","Sequence","SequenceSizeMustBeKnown","String","TooManyBytesRead","TrailingBytes","UnexpectedKind","Unit","UnknownSpecial","UnknownSymbol","UnsupportedByteCount","V4","Value","ValueError","ValueIter","allocation_budget","as_bool","as_bytes","as_float","as_integer","as_str","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","compatibility","custom","custom","custom","custom","de","default","default","deref","deref_mut","deserialize","deserialize","deserialize","deserialize_as","deserialize_from","eq","eq","eq","eq","fmt","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","from","from","from","from","from_iter","from_iter","from_mappings","from_reader","from_sequence","from_serialize","from_slice","into","into","into","into","into","into","into","into_iter","into_static","is_empty","len","mappings","new","next","next_back","reader","ser","serialize","serialize","serialize","serialize_into","to_owned","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_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","values","kind","value","Data","Deserializer","InList","SymbolList","SymbolMap","SymbolMapRef","SymbolStr","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","default","deref","deserialize","deserialize_any","deserialize_bool","deserialize_byte_buf","deserialize_bytes","deserialize_char","deserialize_enum","deserialize_f32","deserialize_f64","deserialize_from","deserialize_from","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_slice","deserialize_slice","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","deserializer_for","deserializer_for_slice","deserializer_for_slice","end_of_input","fmt","fmt","fmt","from","from","from","from","get","into","into","into","into","is_empty","is_human_readable","len","new","newtype_variant_seed","push","push_borrowed","serialize","struct_variant","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","tuple_variant","type_id","type_id","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","UnknownSpecial","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","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","eq","eq","eq","eq","fmt","fmt","fmt","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","from_u8","into","into","into","into","into","into","into","is_zero","is_zero","kind","nucleus","read_atom","read_atom_header","read_from","read_from","read_header","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","try_from","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","try_into","type_id","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","BufferedBytes","Data","IoReader","Reader","Scratch","SliceReader","as_slice","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","buffered_read_bytes","buffered_read_bytes","buffered_read_bytes","fmt","fmt","from","from","from","from","into","into","into","is_empty","len","read","read","read_exact","read_exact","read_to_end","read_to_string","read_vectored","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","MapSerializer","Serializer","SymbolMap","SymbolMapPopulationError","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","custom","default","deserialize","end","end","end","end","end","end","end","fmt","fmt","fmt","fmt","from","from","from","from","insert","into","into","into","into","is_empty","is_human_readable","len","new","new","new_with_compatibility","populate_from","serialize","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_to","serialize_to_vec","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","set_compatibility","to_string","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","with_compatibility"],"q":[[0,"pot"],[191,"pot::ValueError"],[193,"pot::de"],[287,"pot::format"],[462,"pot::reader"],[505,"pot::ser"],[604,"pot::value"],[605,"core::option"],[606,"pot::error"],[607,"core::fmt"],[608,"core::result"],[609,"serde::de"],[610,"std::io"],[611,"std::io::error"],[612,"core::str::error"],[613,"alloc::string"],[614,"alloc::vec"],[615,"core::convert"],[616,"core::iter::traits::collect"],[617,"serde::ser"],[618,"core::slice::iter"],[619,"byteorder::io"],[620,"core::any"],[621,"core::marker"]],"i":[3,3,0,0,18,16,21,0,18,3,14,16,16,3,16,16,16,16,3,16,3,16,21,0,0,3,16,3,16,16,16,3,16,16,16,14,0,0,0,1,3,3,3,3,3,50,16,3,13,18,1,14,50,16,3,13,18,1,14,3,13,1,14,3,13,1,14,1,16,16,18,18,0,1,14,13,13,3,13,1,3,1,3,13,18,14,16,16,3,3,13,18,18,1,14,0,50,16,16,16,16,16,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,13,13,13,18,1,14,3,3,3,0,3,3,0,50,16,3,13,18,1,14,50,3,3,50,3,1,50,50,0,0,3,13,1,1,3,13,1,14,3,16,3,18,0,0,50,16,3,13,18,1,14,50,16,3,13,18,1,14,50,16,3,13,18,1,14,3,80,80,56,0,56,0,0,0,0,58,56,63,55,58,56,63,55,55,56,57,58,58,58,58,58,58,58,58,57,55,58,58,58,58,58,58,58,58,58,58,58,57,55,58,58,58,58,58,58,58,58,58,58,58,58,57,55,57,55,58,58,63,55,58,56,63,55,55,58,56,63,55,55,58,55,55,58,55,55,57,58,58,56,63,55,58,56,63,55,58,58,56,63,55,58,58,0,68,65,68,66,68,66,68,66,0,65,68,65,0,68,0,65,66,68,66,0,65,0,65,65,66,65,66,68,0,67,10,9,10,9,10,10,10,10,10,10,9,10,10,10,10,10,65,66,30,10,67,9,68,65,66,30,10,67,9,68,65,30,10,9,65,30,10,9,65,30,10,9,65,66,30,30,10,10,67,9,9,68,65,66,30,10,10,10,10,10,10,10,10,10,10,10,67,9,9,9,68,65,65,66,30,10,67,9,68,10,9,67,67,0,0,10,9,0,65,30,10,9,30,10,9,65,66,66,30,10,67,9,68,65,66,30,10,67,9,68,65,66,30,10,67,9,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,9,0,0,0,0,0,0,0,0,0,71,0,0,71,0,71,62,61,71,62,61,71,59,62,61,62,71,62,62,61,71,62,61,71,62,62,62,61,62,61,61,61,61,62,61,71,62,61,71,62,61,71,0,0,0,0,75,76,74,73,75,76,74,73,73,74,74,75,75,75,75,76,76,76,75,74,73,73,75,76,74,73,74,75,76,74,73,74,75,74,75,74,75,74,74,75,75,75,75,75,75,75,75,75,76,76,75,75,75,75,75,76,75,75,75,75,75,75,75,75,75,74,74,75,75,75,75,75,75,75,75,75,75,75,76,74,74,73,75,76,74,73,75,76,74,73,75,76,74,73,74],"f":"```````````````````````````````````````{{bd}b}{{{h{f}}}j}{{{h{f}}}{{A`{{h{{n{l}}}}}}}}{{{h{f}}}{{A`{Ab}}}}{{{h{f}}}{{A`{Ad}}}}{{{h{f}}}{{A`{{h{Af}}}}}}{{{h{c}}}{{h{e}}}{}{}}000000{{{h{Ahc}}}{{h{Ahe}}}{}{}}000000{{{h{f}}}f}{{{h{Aj}}}Aj}{{{h{b}}}b}{{{h{Al}}}Al}{{{h{c}}{h{Ahe}}}An{}{}}000{{bAl}b}{cB`Bb}0{cBdBb}0`{{}b}{{}Al}{{{h{Aj}}}{{h{c}}}{}}{{{h{AhAj}}}{{h{Ahc}}}{}}{c{{Bf{f}}}Bh}{c{{Bf{Aj}}}Bh}{{{h{b}}{h{{n{l}}}}}{{Bj{c}}}Bl}{{{h{f}}}{{Bf{cBd}}}Bl}{{{h{b}}c}{{Bj{e}}}BnC`}{{{h{f}}{h{f}}}j}{{{h{Aj}}{h{Aj}}}j}{{{h{Bd}}{h{Bd}}}j}{{{h{Al}}{h{Al}}}j}{{{h{B`}}{h{AhCb}}}Cd}0{{{h{f}}{h{AhCb}}}Cd}0{{{h{Aj}}{h{AhCb}}}Cd}{{{h{Bd}}{h{AhCb}}}Cd}0{{{h{b}}{h{AhCb}}}Cd}{{{h{Al}}{h{AhCb}}}Cd}`{cc{}}0{CfB`}{ChB`}{CjB`}{ClB`}{Cnf}{D`f}{{{Dd{{Db{ff}}}}}f}{jf}{Dff}{{{h{{n{l}}}}}f}{Anf}{Dhf}<{{{A`{f}}}f}{Djf}{Dlf}{{{h{Af}}}f}{Dnf}{{{Dd{l}}}f}{E`f}{Ebf}{lf}{Edf}{Eff}{Ehf}{{{Dd{f}}}f}{{{h{{Ej{l}}}}}f}{{{h{f}}}Aj}{fAj}{cc{}}000{ef{{El{f}}}{{F`{}{{En{c}}}}}}{gf{{El{f}}}{{El{f}}}{{F`{}{{En{{Db{ce}}}}}}}}0{c{{Bj{e}}}BnC`}2{c{{Bf{fBd}}}Fb}{{{h{{n{l}}}}}{{Bj{c}}}Bl}{ce{}{}}0000000{ff}{{{h{f}}}j}{{{h{Fd}}}d}{{{h{f}}}{{Ff{{Db{ff}}}}}}{{}b}{{{h{AhFd}}}{{A`{c}}}{}}0``{{{h{f}}c}BfFh}{{{h{Aj}}c}BfFh}{{{h{b}}{h{c}}}{{Bj{{Dd{l}}}}}Fb}{{{h{b}}{h{c}}e}{{Bj{An}}}FbFj}{{{h{c}}}e{}{}}000{{{h{f}}}f}{{{h{c}}}D`{}}00{{{h{c}}}{{Bj{{Dd{l}}}}}Fb}{{{h{c}}e}{{Bj{An}}}FbFj}{c{{Bf{e}}}{}{}}0000000000000{{{h{c}}}Fl{}}000000{{{h{f}}}Fd}`````````{{{h{c}}}{{h{e}}}{}{}}000{{{h{Ahc}}}{{h{Ahe}}}{}{}}000{{}Fn}{{{h{G`}}}{{h{c}}}{}}{c{{Bf{Gb}}}Bh}{{{h{Ah{Gd{c}}}}e}BjGfGh}0000{{{h{Ah{Gd{c}}}}{h{Af}}{h{{n{{h{Af}}}}}}e}BjGfGh}11{{{h{AhGb}}c}{{Bj{e}}}BnBl}{{{h{AhFn}}c}{{Bj{e}}}BnBl}33333333{{{h{Ah{Gd{c}}}}{h{Af}}e}BjGfGh}44{{{h{AhGb}}{h{{n{l}}}}}{{Bj{c}}}Bl}{{{h{AhFn}}{h{{n{l}}}}}{{Bj{c}}}Bl}665{{{h{Ah{Gd{c}}}}de}BjGfGh}{{{h{Ah{Gd{c}}}}{h{Af}}de}BjGfGh}8888884{{{h{AhGb}}c}{{Bj{{Gd{{Gj{c}}}}}}}Bn}{{{h{AhFn}}c}{{Bj{{Gd{{Gj{c}}}}}}}Bn}{{{h{AhGb}}{h{{n{l}}}}}{{Bj{{Gd{Gl}}}}}}{{{h{AhFn}}{h{{n{l}}}}}{{Bj{{Gd{Gl}}}}}}{{{h{{Gd{Gl}}}}}j}{{{h{{Gd{c}}}}{h{AhCb}}}CdGf}{{{h{Gn}}{h{AhCb}}}Cd}{{{h{Fn}}{h{AhCb}}}Cd}{cc{}}000{{{h{Fn}}d}{{A`{G`}}}}{ce{}{}}000{{{h{Fn}}}j}{{{h{{h{Ah{Gd{c}}}}}}}jGf}{{{h{Fn}}}d}{{}Fn}{{{h{Ah{Gd{c}}}}e}BjGfH`}{{{h{AhFn}}{h{Af}}}An}0{{{h{Gb}}c}BfFh}{{{h{Ah{Gd{c}}}}{h{{n{{h{Af}}}}}}e}BjGfGh}{c{{Bf{e}}}{}{}}0000000{{{h{Ah{Gd{c}}}}de}BjGfGh}{{{h{c}}}Fl{}}000{{{h{Ah{Gd{c}}}}}{{Bj{An}}}Gf}{{{h{Ah{Gd{c}}}}e}{{Bj{{Db{g}}}}}GfH`{}}```````````````````````````````{{{h{Ad}}}{{Bf{DlB`}}}}{{{h{Ab}}}{{Bf{DlB`}}}}{{{h{Ad}}}{{Bf{DjB`}}}}{{{h{Ab}}}Dj}{{{h{Ad}}}{{Bf{AbB`}}}}{{{h{Ad}}}{{Bf{EdB`}}}}{{{h{Ad}}}{{Bf{EbB`}}}}{{{h{Ad}}}{{Bf{DhB`}}}}{{{h{Ad}}}{{Bf{CnB`}}}}{{{h{Ad}}}{{Bf{EhB`}}}}{{{h{Ab}}}{{Bf{AdB`}}}}{{{h{Ad}}}{{Bf{DfB`}}}}{{{h{Ad}}}{{Bf{E`B`}}}}{{{h{Ad}}}{{Bf{DnB`}}}}{{{h{Ad}}}{{Bf{EfB`}}}}{{{h{Ad}}}{{Bf{lB`}}}}{{{h{c}}}{{h{e}}}{}{}}000000{{{h{Ahc}}}{{h{Ahe}}}{}{}}000000{{{h{Hb}}}Hb}{{{h{Cl}}}Cl}{{{h{Ad}}}Ad}{{{h{Ab}}}Ab}{{{h{c}}{h{Ahe}}}An{}{}}000{{{h{Hb}}{h{Hb}}}j}{{{h{Cl}}{h{Cl}}}j}{{{h{Ad}}{h{Ad}}}j}{{{h{Ab}}{h{Ab}}}j}{{{h{Hb}}{h{AhCb}}}Cd}{{{h{Hd}}{h{AhCb}}}Cd}{{{h{Cl}}{h{AhCb}}}Cd}0{{{h{Ad}}{h{AhCb}}}Cd}0{{{h{Hf}}{h{AhCb}}}Cd}{{{h{Ab}}{h{AhCb}}}Cd}0{{{h{Hh}}{h{AhCb}}}Cd}{cc{}}00{EbAd}{EhAd}{CnAd}{DnAd}{lAd}{EdAd}{DfAd}{EfAd}8{E`Ad}{DhAd}:{DlAb};{DjAb}<{l{{Bf{HbB`}}}}{ce{}{}}000000{{{h{Ad}}}j}{{{h{Ab}}}j}``{{{h{Ahc}}{h{Ahd}}{h{Ah{Dd{l}}}}}{{Bf{HfB`}}}Gf}{{{h{Ahc}}}{{Bf{{Db{HbEf}}B`}}}Hj}{{Hbd{h{Ahc}}}{{Bf{AdB`}}}Hj}{{Hbd{h{Ahc}}}{{Bf{AbB`}}}Hj}{{{h{Ahc}}}{{Bf{lB`}}}Hj}{{{h{c}}}e{}{}}000{{{h{c}}}D`{}}00{c{{Bf{e}}}{}{}}0{Ef{{Bf{Hdc}}}{}}111111111111{{{h{c}}}Fl{}}000000{{cHbEf}{{Hl{d}}}Fj}{{cj}{{Hl{d}}}Fj}{{c{h{{n{l}}}}}{{Hl{d}}}Fj}{{cDl}{{Hl{d}}}Fj}{{cDj}{{Hl{d}}}Fj}{{cl}{{Hl{d}}}Fj}{{cEd}{{Hl{d}}}Fj}{{cEb}{{Hl{d}}}Fj}{{cDh}{{Hl{d}}}Fj}0{{cCn}{{Hl{d}}}Fj}0{{cEh}{{Hl{d}}}Fj}{c{{Hl{d}}}Fj}0{{cHd}{{Hl{d}}}Fj}{{c{h{Af}}}{{Hl{d}}}Fj}{{{h{Ad}}c}{{Hl{d}}}Fj}{{{h{Ab}}c}{{Hl{d}}}Fj}{{cDf}{{Hl{d}}}Fj}{{cE`}{{Hl{d}}}Fj}{{cDn}{{Hl{d}}}Fj}0{{cEf}{{Hl{d}}}Fj}0>8``````{{{h{Hn}}{h{{n{l}}}}}{{h{{n{l}}}}}}{{{h{c}}}{{h{e}}}{}{}}00{{{h{Ahc}}}{{h{Ahe}}}{}{}}00{{{h{AhGf}}d{h{Ah{Dd{l}}}}}{{Bf{HnB`}}}}{{{h{AhGl}}d{h{Ah{Dd{l}}}}}{{Bf{HnB`}}}}{{{h{Ah{Gj{c}}}}d{h{Ah{Dd{l}}}}}{{Bf{HnB`}}}Hj}{{{h{Gl}}{h{AhCb}}}Cd}{{{h{Hn}}{h{AhCb}}}Cd}{cc{}}{{{h{{n{l}}}}}Gl}11{ce{}{}}00{{{h{Gl}}}j}{{{h{Gl}}}d}{{{h{AhGl}}{h{Ah{n{l}}}}}{{Hl{d}}}}{{{h{Ah{Gj{c}}}}{h{Ah{n{l}}}}}{{Hl{d}}}Hj}{{{h{AhGl}}{h{Ah{n{l}}}}}{{Hl{An}}}}{{{h{Ah{Gj{c}}}}{h{Ah{n{l}}}}}{{Hl{An}}}Hj}{{{h{Ah{Gj{c}}}}{h{Ah{Dd{l}}}}}{{Hl{d}}}Hj}{{{h{Ah{Gj{c}}}}{h{AhD`}}}{{Hl{d}}}Hj}{{{h{Ah{Gj{c}}}}{h{Ah{n{I`}}}}}{{Hl{d}}}Hj}{c{{Bf{e}}}{}{}}00000{{{h{c}}}Fl{}}00````{{{h{c}}}{{h{e}}}{}{}}000{{{h{Ahc}}}{{h{Ahe}}}{}{}}000{cIbBb}{{}Id}{c{{Bf{Id}}}Bh}{{{h{Ah{If{c}}}}}{{Bj{An}}}Fj}000{{{Ih{c}}}{{Bj{An}}}Fj}00{{{h{{If{c}}}}{h{AhCb}}}CdFj}{{{h{Id}}{h{AhCb}}}Cd}{{{h{Ib}}{h{AhCb}}}Cd}0{cc{}}000{{{h{AhId}}{h{Af}}}j}{ce{}{}}000{{{h{Id}}}j}{{{h{{h{Ah{If{c}}}}}}}jFj}{{{h{Id}}}d}{c{{Bj{{If{c}}}}}Fj}={{cAl}{{Bj{{If{c}}}}}Fj}{{{h{AhId}}{h{c}}}{{Bj{dIb}}}Fb}{{{h{Id}}c}BfFh}{{{h{Ah{If{c}}}}j}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}{h{{n{l}}}}}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}Ij}{{Bj{An}}}Fj}{{{h{Ah{h{Ah{If{c}}}}}}{h{e}}}{{Bj{An}}}Fj{IlFb}}0{{{h{Ah{If{c}}}}Dl}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}Dj}{{Bj{An}}}Fj}22{{{h{Ah{Ih{c}}}}{h{Af}}{h{e}}}{{Bj{An}}}Fj{IlFb}}0{{{h{Ah{If{c}}}}Ed}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}Eb}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}Dh}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}Cn}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}Eh}{{Bj{An}}}Fj}{{{h{Ah{Ih{c}}}}{h{e}}}{{Bj{An}}}Fj{IlFb}}{{{h{Ah{If{c}}}}{A`{d}}}{{Bj{e}}}Fj{}}{{{h{Ah{If{c}}}}{h{Af}}{h{e}}}{{Bj{An}}}Fj{IlFb}}{{{h{Ah{If{c}}}}{h{Af}}Dn{h{Af}}{h{e}}}{{Bj{An}}}Fj{IlFb}}{{{h{Ah{If{c}}}}}{{Bj{An}}}Fj}3{{{h{Ah{If{c}}}}{h{e}}}{{Bj{An}}}Fj{IlFb}}{{{h{Ah{If{c}}}}{h{Af}}}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}{h{Af}}d}{{Bj{e}}}Fj{}}{{{h{Ah{If{c}}}}{h{Af}}Dn{h{Af}}d}{{Bj{e}}}Fj{}}{{{h{AhId}}c{h{e}}}{{Bj{An}}}InFb}{{{h{AhId}}{h{c}}}{{Bj{{Dd{l}}}}}Fb}{{{h{Ah{If{c}}}}d}{{Bj{e}}}Fj{}}43{{{h{Ah{If{c}}}}Df}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}E`}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}Dn}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}Ef}{{Bj{An}}}Fj}{{{h{Ah{If{c}}}}l}{{Bj{An}}}Fj}<:{{{h{Ah{If{c}}}}{h{Af}}Dn{h{Af}}}{{Bj{An}}}Fj}{{{h{Ah{Ih{c}}}}{h{e}}}{{Bj{An}}}Fj{IlFb}}{{{h{AhId}}c}{{Bj{{If{c}}}}}Fj}{{{h{AhId}}Al}An}{{{h{c}}}D`{}}{c{{Bf{e}}}{}{}}0000000{{{h{c}}}Fl{}}000{{IdAl}Id}","D":"AOj","p":[[5,"Config",0],[1,"usize"],[6,"Value",0,604],[1,"reference"],[1,"bool"],[1,"u8"],[1,"slice"],[6,"Option",605],[5,"Float",287],[5,"Integer",287],[1,"str"],[0,"mut"],[5,"OwnedValue",0,604],[6,"Compatibility",0],[1,"unit"],[6,"Error",0,606],[10,"Display",607],[6,"ValueError",0,604],[6,"Result",608],[10,"Deserializer",609],[8,"Result",0],[10,"Deserialize",609],[10,"Read",610],[10,"DeserializeOwned",609],[5,"Formatter",607],[8,"Result",607],[5,"Error",611],[5,"Utf8Error",612],[5,"FromUtf8Error",613],[5,"UnknownSpecial",287],[1,"i64"],[5,"String",613],[1,"tuple"],[5,"Vec",614],[1,"u128"],[1,"i32"],[1,"f64"],[1,"f32"],[1,"u32"],[1,"u16"],[1,"i16"],[1,"i128"],[1,"u64"],[1,"i8"],[1,"array"],[10,"Into",615],[17,"Item"],[10,"IntoIterator",616],[10,"Serialize",617],[5,"ValueIter",0,604],[5,"Iter",618],[10,"Serializer",617],[10,"WriteBytesExt",619],[5,"TypeId",620],[5,"SymbolList",193],[6,"SymbolStr",193],[8,"SymbolMap",193],[5,"Deserializer",193],[10,"Reader",462],[10,"Visitor",609],[5,"IoReader",462],[5,"SliceReader",462],[5,"SymbolMapRef",193],[10,"DeserializeSeed",609],[6,"Kind",287],[6,"Special",287],[5,"Atom",287],[6,"Nucleus",287],[10,"ReadBytesExt",619],[8,"Result",611],[6,"BufferedBytes",462],[5,"IoSliceMut",610],[5,"SymbolMapPopulationError",505],[5,"SymbolMap",505],[5,"Serializer",505],[5,"MapSerializer",505],[1,"char"],[10,"Sized",621],[10,"Write",610],[15,"Expected",191]],"r":[[7,606],[23,604],[36,604],[37,604],[38,604]],"b":[[68,"impl-Error-for-Error"],[69,"impl-Error-for-Error"],[70,"impl-Error-for-ValueError"],[71,"impl-Error-for-ValueError"],[86,"impl-Display-for-Error"],[87,"impl-Debug-for-Error"],[88,"impl-Display-for-Value%3C\'a%3E"],[89,"impl-Debug-for-Value%3C\'a%3E"],[91,"impl-Debug-for-ValueError"],[92,"impl-Display-for-ValueError"],[98,"impl-From%3CError%3E-for-Error"],[99,"impl-From%3CUtf8Error%3E-for-Error"],[100,"impl-From%3CFromUtf8Error%3E-for-Error"],[101,"impl-From%3CUnknownSpecial%3E-for-Error"],[102,"impl-From%3Ci64%3E-for-Value%3C\'a%3E"],[103,"impl-From%3CString%3E-for-Value%3C\'a%3E"],[104,"impl-From%3CVec%3C(Value%3C\'a%3E,+Value%3C\'a%3E)%3E%3E-for-Value%3C\'a%3E"],[105,"impl-From%3Cbool%3E-for-Value%3C\'a%3E"],[106,"impl-From%3Cu128%3E-for-Value%3C\'a%3E"],[107,"impl-From%3C%26%5Bu8%5D%3E-for-Value%3C\'a%3E"],[108,"impl-From%3C()%3E-for-Value%3C\'a%3E"],[109,"impl-From%3Ci32%3E-for-Value%3C\'a%3E"],[111,"impl-From%3COption%3CValue%3C\'a%3E%3E%3E-for-Value%3C\'a%3E"],[112,"impl-From%3Cf64%3E-for-Value%3C\'a%3E"],[113,"impl-From%3Cf32%3E-for-Value%3C\'a%3E"],[114,"impl-From%3C%26str%3E-for-Value%3C\'a%3E"],[115,"impl-From%3Cu32%3E-for-Value%3C\'a%3E"],[116,"impl-From%3CVec%3Cu8%3E%3E-for-Value%3C\'a%3E"],[117,"impl-From%3Cu16%3E-for-Value%3C\'a%3E"],[118,"impl-From%3Ci16%3E-for-Value%3C\'a%3E"],[119,"impl-From%3Cu8%3E-for-Value%3C\'a%3E"],[120,"impl-From%3Ci128%3E-for-Value%3C\'a%3E"],[121,"impl-From%3Cu64%3E-for-Value%3C\'a%3E"],[122,"impl-From%3Ci8%3E-for-Value%3C\'a%3E"],[123,"impl-From%3CVec%3CValue%3C\'a%3E%3E%3E-for-Value%3C\'a%3E"],[124,"impl-From%3C%26%5Bu8;+N%5D%3E-for-Value%3C\'a%3E"],[125,"impl-From%3C%26Value%3C\'a%3E%3E-for-OwnedValue"],[126,"impl-From%3CValue%3C\'a%3E%3E-for-OwnedValue"],[131,"impl-FromIterator%3CA%3E-for-Value%3C\'a%3E"],[132,"impl-FromIterator%3C(K,+V)%3E-for-Value%3C\'a%3E"],[362,"impl-Debug-for-UnknownSpecial"],[363,"impl-Display-for-UnknownSpecial"],[364,"impl-Display-for-Integer"],[365,"impl-Debug-for-Integer"],[367,"impl-Display-for-Float"],[368,"impl-Debug-for-Float"],[373,"impl-From%3Ci16%3E-for-Integer"],[374,"impl-From%3Ci8%3E-for-Integer"],[375,"impl-From%3Ci64%3E-for-Integer"],[376,"impl-From%3Cu32%3E-for-Integer"],[377,"impl-From%3Cu8%3E-for-Integer"],[378,"impl-From%3Ci128%3E-for-Integer"],[379,"impl-From%3Cu128%3E-for-Integer"],[380,"impl-From%3Cu64%3E-for-Integer"],[382,"impl-From%3Cu16%3E-for-Integer"],[383,"impl-From%3Ci32%3E-for-Integer"],[385,"impl-From%3Cf32%3E-for-Float"],[387,"impl-From%3Cf64%3E-for-Float"],[520,"impl-SerializeTupleVariant-for-%26mut+Serializer%3C\'a,+W%3E"],[521,"impl-SerializeTupleStruct-for-%26mut+Serializer%3C\'a,+W%3E"],[522,"impl-SerializeTuple-for-%26mut+Serializer%3C\'a,+W%3E"],[523,"impl-SerializeSeq-for-%26mut+Serializer%3C\'a,+W%3E"],[524,"impl-SerializeStruct-for-MapSerializer%3C\'de,+\'a,+W%3E"],[525,"impl-SerializeMap-for-MapSerializer%3C\'de,+\'a,+W%3E"],[526,"impl-SerializeStructVariant-for-MapSerializer%3C\'de,+\'a,+W%3E"],[529,"impl-Display-for-SymbolMapPopulationError"],[530,"impl-Debug-for-SymbolMapPopulationError"],[551,"impl-SerializeSeq-for-%26mut+Serializer%3C\'a,+W%3E"],[552,"impl-SerializeTuple-for-%26mut+Serializer%3C\'a,+W%3E"],[555,"impl-SerializeTupleStruct-for-%26mut+Serializer%3C\'a,+W%3E"],[556,"impl-SerializeTupleVariant-for-%26mut+Serializer%3C\'a,+W%3E"],[557,"impl-SerializeStruct-for-MapSerializer%3C\'de,+\'a,+W%3E"],[558,"impl-SerializeStructVariant-for-MapSerializer%3C\'de,+\'a,+W%3E"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAF8BJAAuABUARQADAEoABQBTAAwAYwALAHAADwCEAAEAkgAAAJUAAACYAAEAnAABAKAAAwClAAIAqgAUAMkAEgDeAAoA6wALAPwAAgAJAQAADAEAAA8BEABPASMAdgEHAH8BAQCCAQAAhAEAAJcBHADWAQUA3QEDAOIBAADqAQ8A/gEVAB4CAAAkAhoAQQILAE8CDAA="}],\ +["xtask",{"t":"GNNNNHNNNN","n":["Config","borrow","borrow_mut","from","into","main","paths","try_from","try_into","type_id"],"q":[[0,"xtask"],[10,"anyhow"],[11,"alloc::string"],[12,"alloc::vec"],[13,"core::result"],[14,"core::any"]],"i":[0,9,9,9,9,0,9,9,9,9],"f":"`{{{b{c}}}{{b{e}}}{}{}}{{{b{dc}}}{{b{de}}}{}{}}{cc{}}{ce{}{}}{{}{{h{f}}}}{{}{{l{j}}}}{c{{n{e}}}{}{}}0{{{b{c}}}A`{}}","D":"d","p":[[1,"reference"],[0,"mut"],[1,"unit"],[8,"Result",10],[5,"String",11],[5,"Vec",12],[6,"Result",13],[5,"TypeId",14],[6,"Config",0]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAAgAAgAAAAMABgAEAA=="}]\ +]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); diff --git a/main/search.desc/pot/pot-desc-0-.js b/main/search.desc/pot/pot-desc-0-.js new file mode 100644 index 00000000..ca3fbb96 --- /dev/null +++ b/main/search.desc/pot/pot-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("pot", 0, "A concise storage format, written for BonsaiDb.\nA boolean value\nA value containing arbitrary bytes.\nCompatibility settings for Pot.\nSerialization and deserialization configuration.\nA custom deserialization error. These errors originate …\nExpected more data but encountered the end of the input.\nContains the error value\nAll errors that Pot may return.\nA kind of data was expected, but the Value cannot be …\nA floating point value.\nSerializes data that is compatible with all versions of Pot\nA numerical value could not be handled without losing …\nData was written with an incompatible version.\nAn integer value.\nAn atom header was incorrectly formatted.\nAn unknown kind was encountered. Generally a sign that …\nString data contained invalid UTF-8 characters.\nAn IO error occurred.\nA sequence of key-value mappings.\nA generic error occurred.\nA value representing None.\nPayload is not a Pot payload.\nContains the success value\nA Value<'static> wrapper that supports DeserializeOwned.\nA result alias that returns Error.\nA sequence of values.\nA sequence of unknown size cannot be serialized.\nA string value.\nThe amount of data read exceeds the configured maximum …\nExtra data appeared at the end of the input.\nEncountered an unexpected atom kind.\nA value representing unit (()).\nAn unknown Special was encountered.\nA requested symbol id was not found.\nAn unsupported byte count for a numeric type was …\nSerializes data in the default format\nA Pot-encoded value. This type can be used to deserialize …\nAn error from deserializing a type using …\nAn iterator over values contained within a Value.\nSets the maximum number of bytes able to be allocated. …\nReturns the value as a bool.\nReturns the value as bytes, or None if the value is not …\nReturns the value as an Float. Returns None if the value …\nReturns the value as an Integer. Returns None if the value …\nReturns the value as a string, or None if the value is not …\nSets the compatibility mode for serializing and returns …\nTypes for deserializing pots.\nDeserializes a value from a slice using the configured …\nAttempts to create an instance of T from this value.\nDeserializes a value from a Read implementer using the …\nLow-level interface for reading and writing the pot format.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns a new value from an iterator of 2-element tuples …\nRestores a previously Pot-serialized value from a Read …\nReturns a new value from an iterator of items that can be …\nCreates a Value from the given Serde-compatible type.\nRestores a previously Pot-serialized value from a slice.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nConverts self to a 'static lifetime by cloning any …\nReturns true if the value contained is considered empty.\nReturns an iterator that iterates over all mappings …\nReturns the default configuration.\nTypes for reading data.\nTypes for serializing pots.\nSerializes a value to a Vec using the configured options.\nSerializes a value to a writer using the configured …\nConverts self to a 'static lifetime by cloning all data.\nSerialize value using Pot into a Vec<u8>.\nSerialize value using Pot into writer.\nReturns an iterator that iterates over all values …\nThe kind of data expected.\nThe value that was encountered.\nA symbol that has been borrowed from the data being …\nDeserializer for the Pot format.\nA symbol that is stored inside of the SymbolList.\nA collection of symbols accumulated during deserialization.\nAn alias to a SymbolList with a static lifetime. This type …\nA reference to a SymbolList.\nA symbol stored in a SymbolList.\nDeserializes T from reader.\nDeserializes T from reader.\nDeserializes T from slice.\nDeserializes T from slice.\nReturns a deserializer for reader.\nReturns a deserializer for reader.\nReturns a deserializer for slice that reuses symbol ids.\nReturns a deserializer for slice that reuses symbol ids.\nReturns true if the input has been consumed completely.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturn the symbol stored at index, or None if index is out …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns true if there are no symbols in this list.\nReturns the number of entries in the symbol list.\nReturns a new, empty symbol list.\nPush a symbol that cannot be borrowed from the …\nPush a symbol that has been borrowed from the …\nAn encoded Kind, argument, and optional contained value.\nA boolean value.\nA series of bytes. The argument is the length. The bytes …\nA buffer of bytes.\nA terminal value for a Self::DynamicMap.\nA marker denoting the end of a map with unknown length.\nA sequence of key-value pairs with an unknown length.\nA marker denoting a map with unknown length is next in the …\nThe false boolean literal.\nA floating point number that can safely convert between …\nA floating point value. Argument is the byte length, minus …\nA floating point value.\nA signed integer. Argument is the byte length, minus one. …\nAn integer type that can safely convert between other …\nAn integer value.\nThe type of an atom.\nA list of key-value pairs. Argument is the count of …\nA named value. A symbol followed by another value.\nA named value.\nA None value.\nA value contained within an Atom.\nA list of atoms. Argument is the count of atoms in the …\nA special value type.\nA value with a special meaning.\nA symbol. If the least-significant bit of the arg is 0, …\nThe true boolean literal.\nAn unsigned integer. Argument is the byte length, minus …\nA Unit value.\nA unit.\nAn unknown Special was encountered.\nThe argument contained in the atom header.\nConverts this integer to an f32, but only if it can be …\nReturns this number as an f32, if it can be done without …\nConverts this integer to an f64, but only if it can be …\nReturns this number as an f64.\nConverts this integer to an f64, but only if it can be …\nReturns the contained value as an i64, or an error if the …\nReturns the contained value as an i16, or an error if the …\nReturns the contained value as an i32, or an error if the …\nReturns the contained value as an i64, or an error if the …\nReturns the contained value as an i8, or an error if the …\nReturns this number as an Integer, if the stored value has …\nReturns the contained value as an u64, or an error if the …\nReturns the contained value as an u16, or an error if the …\nReturns the contained value as an u32, or an error if the …\nReturns the contained value as an u64, or an error if the …\nReturns the contained value as an u8, or an error if the …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nConverts from a u8. Returns an error if kind is an invalid …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns true if the value contained is zero.\nReturns true if the value contained is zero.\nThe type of atom.\nThe contained value, if any.\nReads an atom.\nReads an atom header (kind and argument).\nReads an integer based on the atom header (kind and …\nReads a floating point number given the atom kind and …\nReads a Pot header. See write_header for more information. …\nWrites an atom header into writer.\nWrites a Kind::Special atom with either Special::True or …\nWrites an Kind::Bytes atom with the given value.\nWrites an Kind::Float atom with the given value.\nWrites an Kind::Float atom with the given value.\nWrites the Pot header. A u32 written in big endian. The …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites a Kind::Special atom with Special::Named.\nWrites a Kind::Special atom with Special::None.\nWrites a Kind::Special atom.\nWrites an Kind::Bytes atom with the bytes of the string.\nWrites this value using the smallest form possible.\nWrites this value using the smallest form possible.\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::Int atom with the given value. Will encode …\nWrites an Kind::UInt atom with the given value.\nWrites a Kind::Special atom with Special::Unit.\nBytes that have been read into a buffer.\nThe bytes that have been read can be borrowed from the …\nA reader over ReadBytesExt.\nA reader that can temporarily buffer bytes read.\nThe bytes that have been read have been stored in the …\nReads data from a slice.\nResolves the bytes to a byte slice.\nReads exactly length bytes.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns true if there are no bytes remaining to read.\nReturns the remaining bytes to read.\nSerializes map-like values.\nA Pot serializer.\nA list of previously serialized symbols.\nA Serialize implementation returned an error.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nInserts symbol into this map.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns true if the map has no entries.\nReturns the number of entries in this map.\nReturns a new serializer outputting written bytes into …\nReturns a new, empty symbol map.\nReturns a new serializer outputting written bytes into …\nAdds all symbols encountered in value.\nSerializes value into writer while persisting symbols into …\nSerializes value into a new Vec<u8> while persisting …\nReturns a serializer that writes into output and persists …\nSets the compatibility mode for serializing.\nSets the compatibility mode for serializing and returns …") \ No newline at end of file diff --git a/main/search.desc/xtask/xtask-desc-0-.js b/main/search.desc/xtask/xtask-desc-0-.js new file mode 100644 index 00000000..54febecd --- /dev/null +++ b/main/search.desc/xtask/xtask-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("xtask", 0, "Returns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file diff --git a/main/settings.html b/main/settings.html index d92ff782..8c3ade44 100644 --- a/main/settings.html +++ b/main/settings.html @@ -1 +1 @@ -Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/main/source-files.js b/main/source-files.js deleted file mode 100644 index 1076608a..00000000 --- a/main/source-files.js +++ /dev/null @@ -1,5 +0,0 @@ -var sourcesIndex = JSON.parse('{\ -"pot":["",[],["de.rs","error.rs","format.rs","lib.rs","reader.rs","ser.rs","value.rs"]],\ -"xtask":["",[],["main.rs"]]\ -}'); -createSourceSidebar(); diff --git a/main/src-files.js b/main/src-files.js new file mode 100644 index 00000000..f5eb2999 --- /dev/null +++ b/main/src-files.js @@ -0,0 +1,5 @@ +var srcIndex = new Map(JSON.parse('[\ +["pot",["",[],["de.rs","error.rs","format.rs","lib.rs","reader.rs","ser.rs","value.rs"]]],\ +["xtask",["",[],["main.rs"]]]\ +]')); +createSrcSidebar(); diff --git a/main/src/pot/de.rs.html b/main/src/pot/de.rs.html index 58bc8d74..8e27d1cc 100644 --- a/main/src/pot/de.rs.html +++ b/main/src/pot/de.rs.html @@ -1,4 +1,4 @@ -de.rs - source
1
+de.rs - source
1
 2
 3
 4
@@ -1308,6 +1308,12 @@
 1308
 1309
 1310
+1311
+1312
+1313
+1314
+1315
+1316
 
use std::borrow::Cow;
 use std::collections::VecDeque;
 use std::fmt::Debug;
@@ -1322,7 +1328,7 @@
 };
 use serde::ser::SerializeSeq;
 use serde::{Deserialize, Serialize};
-#[cfg(feature = "tracing")]
+#[cfg(feature = "tracing")]
 use tracing::instrument;
 
 use crate::format::{
@@ -1332,34 +1338,34 @@
 use crate::{Error, Result};
 
 /// Deserializer for the Pot format.
-pub struct Deserializer<'s, 'de, R: Reader<'de>> {
+pub struct Deserializer<'s, 'de, R: Reader<'de>> {
     input: R,
-    symbols: SymbolMapRef<'s, 'de>,
-    peeked_atom: VecDeque<Atom<'de>>,
+    symbols: SymbolMapRef<'s, 'de>,
+    peeked_atom: VecDeque<Atom<'de>>,
     remaining_budget: usize,
     scratch: Vec<u8>,
 }
 
-impl<'s, 'de, R: Reader<'de>> Debug for Deserializer<'s, 'de, R> {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        f.debug_struct("Deserializer")
-            .field("symbols", &self.symbols)
-            .field("peeked_atom", &self.peeked_atom)
-            .field("remaining_budget", &self.remaining_budget)
+impl<'s, 'de, R: Reader<'de>> Debug for Deserializer<'s, 'de, R> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("Deserializer")
+            .field("symbols", &self.symbols)
+            .field("peeked_atom", &self.peeked_atom)
+            .field("remaining_budget", &self.remaining_budget)
             .finish()
     }
 }
 
-impl<'s, 'de> Deserializer<'s, 'de, SliceReader<'de>> {
+impl<'s, 'de> Deserializer<'s, 'de, SliceReader<'de>> {
     /// Returns a new deserializer for `input`.
     #[inline]
-    pub(crate) fn from_slice(input: &'de [u8], maximum_bytes_allocatable: usize) -> Result<Self> {
+    pub(crate) fn from_slice(input: &'de [u8], maximum_bytes_allocatable: usize) -> Result<Self> {
         Self::from_slice_with_symbols(input, SymbolMapRef::temporary(), maximum_bytes_allocatable)
     }
 
     fn from_slice_with_symbols(
-        input: &'de [u8],
-        symbols: SymbolMapRef<'s, 'de>,
+        input: &'de [u8],
+        symbols: SymbolMapRef<'s, 'de>,
         maximum_bytes_allocatable: usize,
     ) -> Result<Self> {
         Self::new(SliceReader::from(input), symbols, maximum_bytes_allocatable)
@@ -1373,23 +1379,23 @@
     }
 }
 
-impl<'s, 'de, R: ReadBytesExt> Deserializer<'s, 'de, IoReader<R>> {
+impl<'s, 'de, R: ReadBytesExt> Deserializer<'s, 'de, IoReader<R>> {
     /// Returns a new deserializer for `input`.
     #[inline]
     pub(crate) fn from_read(
         input: R,
-        symbols: SymbolMapRef<'s, 'de>,
+        symbols: SymbolMapRef<'s, 'de>,
         maximum_bytes_allocatable: usize,
     ) -> Result<Self> {
         Self::new(IoReader::new(input), symbols, maximum_bytes_allocatable)
     }
 }
 
-impl<'s, 'de, R: Reader<'de>> Deserializer<'s, 'de, R> {
+impl<'s, 'de, R: Reader<'de>> Deserializer<'s, 'de, R> {
     #[inline]
     pub(crate) fn new(
         input: R,
-        symbols: SymbolMapRef<'s, 'de>,
+        symbols: SymbolMapRef<'s, 'de>,
         maximum_bytes_allocatable: usize,
     ) -> Result<Self> {
         let mut deserializer = Deserializer {
@@ -1405,14 +1411,14 @@
 
     fn read_header(&mut self) -> Result<()> {
         let version = format::read_header(&mut self.input)?;
-        if version == CURRENT_VERSION {
+        if version <= CURRENT_VERSION {
             Ok(())
         } else {
             Err(Error::IncompatibleVersion)
         }
     }
 
-    fn read_atom(&mut self) -> Result<Atom<'de>> {
+    fn read_atom(&mut self) -> Result<Atom<'de>> {
         if let Some(peeked) = self.peeked_atom.pop_front() {
             Ok(peeked)
         } else {
@@ -1425,7 +1431,7 @@
     }
 
     #[allow(clippy::missing_panics_doc)]
-    fn peek_atom_at(&mut self, index: usize) -> Result<&Atom<'_>> {
+    fn peek_atom_at(&mut self, index: usize) -> Result<&Atom<'_>> {
         while index >= self.peeked_atom.len() {
             let atom = self.read_atom()?;
             self.peeked_atom.push_back(atom);
@@ -1435,15 +1441,15 @@
     }
 
     #[allow(clippy::missing_panics_doc)]
-    fn peek_atom(&mut self) -> Result<&Atom<'_>> {
+    fn peek_atom(&mut self) -> Result<&Atom<'_>> {
         self.peek_atom_at(0)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[allow(clippy::cast_possible_truncation)]
-    fn visit_symbol<V>(&mut self, atom: &Atom<'_>, visitor: V) -> Result<V::Value>
+    fn visit_symbol<V>(&mut self, atom: &Atom<'_>, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let is_id = atom.arg & 0b1 != 0;
         let arg = atom.arg >> 1;
@@ -1471,7 +1477,7 @@
     }
 }
 
-impl<'a, 'de, 's, R: Reader<'de>> de::Deserializer<'de> for &'a mut Deserializer<'s, 'de, R> {
+impl<'a, 'de, 's, R: Reader<'de>> de::Deserializer<'de> for &'a mut Deserializer<'s, 'de, R> {
     type Error = Error;
 
     #[inline]
@@ -1482,12 +1488,12 @@
     // Look at the input data to decide what Serde data model type to
     // deserialize as. Not all data formats are able to support this operation.
     // Formats that support `deserialize_any` are known as self-describing.
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[allow(clippy::cast_possible_truncation)]
     #[inline]
     fn deserialize_any<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
 
@@ -1497,9 +1503,9 @@
                 Some(Nucleus::Unit) => visitor.visit_unit(),
                 Some(Nucleus::Named) => visitor.visit_map(AtomList::new(self, Some(1))),
                 Some(Nucleus::DynamicMap) => visitor.visit_map(AtomList::new(self, None)),
-                Some(Nucleus::DynamicEnd) => Err(Error::custom("unexpected dynamic end")),
+                Some(Nucleus::DynamicEnd) => Err(Error::custom("unexpected dynamic end")),
                 Some(Nucleus::Bytes(_) | Nucleus::Integer(_) | Nucleus::Float(_)) => {
-                    unreachable!("read_atom can't return this nucleus as a Special")
+                    unreachable!("read_atom can't return this nucleus as a Special")
                 }
                 None => visitor.visit_none(),
             },
@@ -1517,7 +1523,7 @@
                 Some(Nucleus::Integer(Integer(InnerInteger::I128(value)))) => {
                     visitor.visit_i128(value)
                 }
-                _ => unreachable!("read_atom should never return anything else"),
+                _ => unreachable!("read_atom should never return anything else"),
             },
             Kind::UInt => match atom.nucleus {
                 Some(Nucleus::Integer(Integer(InnerInteger::U8(value)))) => visitor.visit_u8(value),
@@ -1533,12 +1539,12 @@
                 Some(Nucleus::Integer(Integer(InnerInteger::U128(value)))) => {
                     visitor.visit_u128(value)
                 }
-                _ => unreachable!("read_atom should never return anything else"),
+                _ => unreachable!("read_atom should never return anything else"),
             },
             Kind::Float => match atom.nucleus {
                 Some(Nucleus::Float(Float(InnerFloat::F32(value)))) => visitor.visit_f32(value),
                 Some(Nucleus::Float(Float(InnerFloat::F64(value)))) => visitor.visit_f64(value),
-                _ => unreachable!("read_atom should never return anything else"),
+                _ => unreachable!("read_atom should never return anything else"),
             },
             Kind::Sequence => visitor.visit_seq(AtomList::new(self, Some(atom.arg as usize))),
             Kind::Map => visitor.visit_map(AtomList::new(self, Some(atom.arg as usize))),
@@ -1567,11 +1573,11 @@
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1580,18 +1586,18 @@
                 Some(Nucleus::Boolean(b)) => visitor.visit_bool(b),
                 Some(Nucleus::Unit) | None => visitor.visit_bool(false),
                 other => Err(Error::custom(format!(
-                    "expected bool nucleus, got {other:?}"
+                    "expected bool nucleus, got {other:?}"
                 ))),
             },
-            other => Err(Error::custom(format!("expected bool, got {other:?}"))),
+            other => Err(Error::custom(format!("expected bool, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1599,21 +1605,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_i8(integer.as_i8()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_i8(0)
             }
-            other => Err(Error::custom(format!("expected i8, got {other:?}"))),
+            other => Err(Error::custom(format!("expected i8, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1621,21 +1627,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_i16(integer.as_i16()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_i16(0)
             }
-            other => Err(Error::custom(format!("expected i16, got {other:?}"))),
+            other => Err(Error::custom(format!("expected i16, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1643,21 +1649,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_i32(integer.as_i32()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_i32(0)
             }
-            other => Err(Error::custom(format!("expected i32, got {other:?}"))),
+            other => Err(Error::custom(format!("expected i32, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1665,21 +1671,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_i64(integer.as_i64()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_i64(0)
             }
-            other => Err(Error::custom(format!("expected i64, got {other:?}"))),
+            other => Err(Error::custom(format!("expected i64, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1687,21 +1693,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_i128(integer.as_i128()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_i128(0)
             }
-            other => Err(Error::custom(format!("expected i128, got {other:?}"))),
+            other => Err(Error::custom(format!("expected i128, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1709,21 +1715,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_u8(integer.as_u8()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_u8(0)
             }
-            other => Err(Error::custom(format!("expected u8, got {other:?}"))),
+            other => Err(Error::custom(format!("expected u8, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1731,21 +1737,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_u16(integer.as_u16()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_u16(0)
             }
-            other => Err(Error::custom(format!("expected u16, got {other:?}"))),
+            other => Err(Error::custom(format!("expected u16, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1753,21 +1759,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_u32(integer.as_u32()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_u32(0)
             }
-            other => Err(Error::custom(format!("expected u32, got {other:?}"))),
+            other => Err(Error::custom(format!("expected u32, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1775,21 +1781,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_u64(integer.as_u64()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_u64(0)
             }
-            other => Err(Error::custom(format!("expected u64, got {other:?}"))),
+            other => Err(Error::custom(format!("expected u64, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1797,21 +1803,21 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_u128(integer.as_u128()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_u128(0)
             }
-            other => Err(Error::custom(format!("expected i64, got {other:?}"))),
+            other => Err(Error::custom(format!("expected i64, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1819,7 +1825,7 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_f32(integer.as_f32()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
 
@@ -1827,21 +1833,21 @@
                 if let Some(Nucleus::Float(float)) = atom.nucleus {
                     visitor.visit_f32(float.as_f32()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_f32(0.)
             }
-            other => Err(Error::custom(format!("expected f32, got {other:?}"))),
+            other => Err(Error::custom(format!("expected f32, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1849,7 +1855,7 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_f64(integer.as_f64()?)
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
 
@@ -1857,21 +1863,21 @@
                 if let Some(Nucleus::Float(float)) = atom.nucleus {
                     visitor.visit_f64(float.as_f64())
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
                 visitor.visit_f64(0.)
             }
-            other => Err(Error::custom(format!("expected f64, got {other:?}"))),
+            other => Err(Error::custom(format!("expected f64, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_char<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1879,24 +1885,24 @@
                 if let Some(Nucleus::Integer(integer)) = atom.nucleus {
                     visitor.visit_char(
                         char::from_u32(integer.as_u32()?)
-                            .ok_or_else(|| Error::InvalidUtf8(String::from("invalid char")))?,
+                            .ok_or_else(|| Error::InvalidUtf8(String::from("invalid char")))?,
                     )
                 } else {
-                    unreachable!("read_atom should never return anything else")
+                    unreachable!("read_atom should never return anything else")
                 }
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
-                visitor.visit_char('\0')
+                visitor.visit_char('\0')
             }
-            other => Err(Error::custom(format!("expected char, got {other:?}"))),
+            other => Err(Error::custom(format!("expected char, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_str<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1907,7 +1913,7 @@
                     }
                     BufferedBytes::Scratch => visitor.visit_str(str::from_utf8(&self.scratch)?),
                 },
-                _ => unreachable!("read_atom should never return anything else"),
+                _ => unreachable!("read_atom should never return anything else"),
             },
             Kind::Symbol => self.visit_symbol(&atom, visitor),
             Kind::Special => {
@@ -1915,30 +1921,30 @@
                     // If we encounter a named entity here, skip it and trust that serde will decode the following information correctly.
                     self.deserialize_str(visitor)
                 } else if matches!(atom.nucleus, Some(Nucleus::Unit) | None) {
-                    visitor.visit_borrowed_str("")
+                    visitor.visit_borrowed_str("")
                 } else {
                     self.visit_symbol(&atom, visitor)
                 }
             }
-            other => Err(Error::custom(format!("expected str, got {other:?}"))),
+            other => Err(Error::custom(format!("expected str, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_string<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         self.deserialize_str(visitor)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[allow(clippy::cast_possible_truncation)]
     #[inline]
     fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -1947,7 +1953,7 @@
                     BufferedBytes::Data(bytes) => visitor.visit_borrowed_bytes(bytes),
                     BufferedBytes::Scratch => visitor.visit_bytes(&self.scratch),
                 },
-                _ => unreachable!("read_atom should never return anything else"),
+                _ => unreachable!("read_atom should never return anything else"),
             },
             Kind::Sequence => {
                 let mut buffer = Vec::with_capacity(atom.arg as usize);
@@ -1958,33 +1964,33 @@
                         buffer.push(integer.as_u8()?);
                     } else {
                         return Err(Error::custom(
-                            "expected byte array, encountered non-integer atom",
+                            "expected byte array, encountered non-integer atom",
                         ));
                     }
                 }
                 visitor.visit_byte_buf(buffer)
             }
             Kind::Special if matches!(atom.nucleus, Some(Nucleus::Unit) | None) => {
-                visitor.visit_borrowed_bytes(b"")
+                visitor.visit_borrowed_bytes(b"")
             }
-            other => Err(Error::custom(format!("expected bytes, got {other:?}"))),
+            other => Err(Error::custom(format!("expected bytes, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         self.deserialize_bytes(visitor)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_option<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.peek_atom()?;
         if matches!(atom.kind, Kind::Special) && atom.nucleus.is_none() {
@@ -1997,26 +2003,26 @@
     }
 
     // In Serde, unit means an anonymous value containing no data.
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         if atom.kind == Kind::Special && matches!(atom.nucleus, Some(Nucleus::Unit)) {
             visitor.visit_unit()
         } else {
-            Err(Error::custom(format!("expected unit, got {:?}", atom.kind)))
+            Err(Error::custom(format!("expected unit, got {:?}", atom.kind)))
         }
     }
 
     // Unit struct means a named value containing no data.
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
-    fn deserialize_unit_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value>
+    fn deserialize_unit_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         self.deserialize_unit(visitor)
     }
@@ -2024,21 +2030,21 @@
     // As is done here, serializers are encouraged to treat newtype structs as
     // insignificant wrappers around the data they contain. That means not
     // parsing anything other than the contained value.
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
-    fn deserialize_newtype_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value>
+    fn deserialize_newtype_struct<V>(self, _name: &'static str, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         visitor.visit_newtype_struct(self)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[allow(clippy::cast_possible_truncation)]
     #[inline]
     fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         if atom.kind == Kind::Sequence {
@@ -2047,17 +2053,17 @@
             visitor.visit_seq(EmptyList)
         } else {
             Err(Error::custom(format!(
-                "expected sequence, got {:?}",
+                "expected sequence, got {:?}",
                 atom.kind
             )))
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         self.deserialize_seq(visitor)
     }
@@ -2065,22 +2071,22 @@
     #[inline]
     fn deserialize_tuple_struct<V>(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _len: usize,
         visitor: V,
     ) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         self.deserialize_seq(visitor)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[allow(clippy::cast_possible_truncation)]
     #[inline]
     fn deserialize_map<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match (atom.kind, atom.nucleus) {
@@ -2089,44 +2095,44 @@
                 visitor.visit_map(AtomList::new(self, None))
             }
             (Kind::Special, Some(Nucleus::Unit) | None) => visitor.visit_map(EmptyList),
-            (kind, _) => Err(Error::custom(format!("expected map, got {kind:?}"))),
+            (kind, _) => Err(Error::custom(format!("expected map, got {kind:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_struct<V>(
         self,
-        _name: &'static str,
-        _fields: &'static [&'static str],
+        _name: &'static str,
+        _fields: &'static [&'static str],
         visitor: V,
     ) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         self.deserialize_map(visitor)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_enum<V>(
         self,
-        _name: &'static str,
-        _variants: &'static [&'static str],
+        _name: &'static str,
+        _variants: &'static [&'static str],
         visitor: V,
     ) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         visitor.visit_enum(self)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[allow(clippy::cast_possible_truncation)]
     #[inline]
     fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         let atom = self.read_atom()?;
         match atom.kind {
@@ -2137,18 +2143,18 @@
                         .map_err(|err| Error::InvalidUtf8(err.to_string()))?;
                     visitor.visit_str(as_str)
                 } else {
-                    unreachable!("read_atom shouldn't return anything else")
+                    unreachable!("read_atom shouldn't return anything else")
                 }
             }
-            other => Err(Error::custom(format!("expected identifier, got {other:?}"))),
+            other => Err(Error::custom(format!("expected identifier, got {other:?}"))),
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         self.deserialize_any(visitor)
     }
@@ -2156,13 +2162,13 @@
 
 struct EmptyList;
 
-impl<'de> MapAccess<'de> for EmptyList {
+impl<'de> MapAccess<'de> for EmptyList {
     type Error = Error;
 
     #[inline]
     fn next_key_seed<K>(&mut self, _seed: K) -> Result<Option<K::Value>>
     where
-        K: DeserializeSeed<'de>,
+        K: DeserializeSeed<'de>,
     {
         Ok(None)
     }
@@ -2170,33 +2176,33 @@
     #[inline]
     fn next_value_seed<V>(&mut self, _seed: V) -> Result<V::Value>
     where
-        V: DeserializeSeed<'de>,
+        V: DeserializeSeed<'de>,
     {
         unreachable!()
     }
 }
 
-impl<'de> SeqAccess<'de> for EmptyList {
+impl<'de> SeqAccess<'de> for EmptyList {
     type Error = Error;
 
     #[inline]
     fn next_element_seed<T>(&mut self, _seed: T) -> Result<Option<T::Value>>
     where
-        T: DeserializeSeed<'de>,
+        T: DeserializeSeed<'de>,
     {
         Ok(None)
     }
 }
 
-struct AtomList<'a, 's, 'de, R: Reader<'de>> {
-    de: &'a mut Deserializer<'s, 'de, R>,
+struct AtomList<'a, 's, 'de, R: Reader<'de>> {
+    de: &'a mut Deserializer<'s, 'de, R>,
     consumed: usize,
     count: Option<usize>,
     eof: bool,
 }
 
-impl<'a, 's, 'de, R: Reader<'de>> AtomList<'a, 's, 'de, R> {
-    fn new(de: &'a mut Deserializer<'s, 'de, R>, count: Option<usize>) -> Self {
+impl<'a, 's, 'de, R: Reader<'de>> AtomList<'a, 's, 'de, R> {
+    fn new(de: &'a mut Deserializer<'s, 'de, R>, count: Option<usize>) -> Self {
         Self {
             de,
             count,
@@ -2228,25 +2234,25 @@
     }
 }
 
-impl<'a, 's, 'de, R: Reader<'de>> Debug for AtomList<'a, 's, 'de, R> {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        f.debug_struct("AtomList")
-            .field("de", &self.de)
-            .field("consumed", &self.consumed)
-            .field("count", &self.count)
-            .field("eof", &self.eof)
+impl<'a, 's, 'de, R: Reader<'de>> Debug for AtomList<'a, 's, 'de, R> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("AtomList")
+            .field("de", &self.de)
+            .field("consumed", &self.consumed)
+            .field("count", &self.count)
+            .field("eof", &self.eof)
             .finish()
     }
 }
 
-impl<'a, 's, 'de, R: Reader<'de>> SeqAccess<'de> for AtomList<'a, 's, 'de, R> {
+impl<'a, 's, 'de, R: Reader<'de>> SeqAccess<'de> for AtomList<'a, 's, 'de, R> {
     type Error = Error;
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
     #[inline]
     fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>>
     where
-        T: DeserializeSeed<'de>,
+        T: DeserializeSeed<'de>,
     {
         if self.check_is_eof()? {
             Ok(None)
@@ -2262,14 +2268,14 @@
     }
 }
 
-impl<'a, 's, 'de, R: Reader<'de>> MapAccess<'de> for AtomList<'a, 's, 'de, R> {
+impl<'a, 's, 'de, R: Reader<'de>> MapAccess<'de> for AtomList<'a, 's, 'de, R> {
     type Error = Error;
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
     #[inline]
     fn next_key_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>>
     where
-        T: DeserializeSeed<'de>,
+        T: DeserializeSeed<'de>,
     {
         if self.check_is_eof()? {
             Ok(None)
@@ -2279,11 +2285,11 @@
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
     #[inline]
     fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value>
     where
-        V: DeserializeSeed<'de>,
+        V: DeserializeSeed<'de>,
     {
         // Deserialize a map value.
         seed.deserialize(&mut *self.de)
@@ -2295,62 +2301,68 @@
     }
 }
 
-impl<'a, 's, 'de, R: Reader<'de>> EnumAccess<'de> for &'a mut Deserializer<'s, 'de, R> {
+impl<'a, 's, 'de, R: Reader<'de>> EnumAccess<'de> for &'a mut Deserializer<'s, 'de, R> {
     type Error = Error;
     type Variant = Self;
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
     #[inline]
     fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant)>
     where
-        V: DeserializeSeed<'de>,
+        V: DeserializeSeed<'de>,
     {
         // Have the seed deserialize the next atom, which should be the symbol.
-        let atom = self.read_atom()?;
-        if atom.kind == Kind::Special && matches!(atom.nucleus, Some(Nucleus::Named)) {
-            let val = seed.deserialize(&mut *self)?;
-            Ok((val, self))
-        } else {
-            Err(Error::custom(format!(
-                "expected Named, got {:?}",
+        let atom = self.peek_atom()?;
+        match atom.kind {
+            Kind::Special if matches!(atom.nucleus, Some(Nucleus::Named)) => {
+                self.read_atom()?;
+                let val = seed.deserialize(&mut *self)?;
+                Ok((val, self))
+            }
+            Kind::Symbol => {
+                let val = seed.deserialize(&mut *self)?;
+                Ok((val, self))
+            }
+            _ => Err(Error::custom(format!(
+                "expected Named, got {:?}",
                 atom.kind
-            )))
+            ))),
         }
     }
 }
 
-impl<'a, 's, 'de, R: Reader<'de>> VariantAccess<'de> for &'a mut Deserializer<'s, 'de, R> {
+impl<'a, 's, 'de, R: Reader<'de>> VariantAccess<'de> for &'a mut Deserializer<'s, 'de, R> {
     type Error = Error;
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn unit_variant(self) -> Result<()> {
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(seed)))]
     #[inline]
     fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value>
     where
-        T: DeserializeSeed<'de>,
+        T: DeserializeSeed<'de>,
     {
         seed.deserialize(self)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
     fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         de::Deserializer::deserialize_seq(self, visitor)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(visitor)))]
     #[inline]
-    fn struct_variant<V>(self, _fields: &'static [&'static str], visitor: V) -> Result<V::Value>
+    fn struct_variant<V>(self, _fields: &'static [&'static str], visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         de::Deserializer::deserialize_map(self, visitor)
     }
@@ -2358,19 +2370,19 @@
 
 /// A reference to a [`SymbolList`].
 #[derive(Debug)]
-pub struct SymbolMapRef<'a, 'de>(SymbolMapRefPrivate<'a, 'de>);
+pub struct SymbolMapRef<'a, 'de>(SymbolMapRefPrivate<'a, 'de>);
 
 #[derive(Debug)]
-enum SymbolMapRefPrivate<'a, 'de> {
+enum SymbolMapRefPrivate<'a, 'de> {
     /// A reference to a temporary symbol list, which is able to borrow from the
     /// source data.
-    Temporary(SymbolList<'de>),
+    Temporary(SymbolList<'de>),
     /// A reference to a persistent symbol list that retains symbols across
     /// multiple deserialization sessions.
-    Persistent(&'a mut SymbolMap),
+    Persistent(&'a mut SymbolMap),
 }
 
-impl<'a, 'de> SymbolMapRef<'a, 'de> {
+impl<'a, 'de> SymbolMapRef<'a, 'de> {
     pub(crate) const fn temporary() -> Self {
         Self(SymbolMapRefPrivate::Temporary(SymbolList::new()))
     }
@@ -2378,7 +2390,7 @@
     #[allow(clippy::cast_possible_truncation)]
     fn visit_symbol_id<V>(&self, symbol_id: u64, visitor: V) -> Result<V::Value>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         match &self.0 {
             SymbolMapRefPrivate::Temporary(vec) => {
@@ -2407,7 +2419,7 @@
         }
     }
 
-    fn push_borrowed(&mut self, symbol: &'de str) {
+    fn push_borrowed(&mut self, symbol: &'de str) {
         match &mut self.0 {
             SymbolMapRefPrivate::Temporary(vec) => vec.push_borrowed(symbol),
             SymbolMapRefPrivate::Persistent(vec) => vec.push(symbol),
@@ -2417,19 +2429,19 @@
 
 /// A collection of symbols accumulated during deserialization.
 #[derive(Debug)]
-pub struct SymbolList<'de> {
+pub struct SymbolList<'de> {
     buffer: String,
-    entries: Vec<SymbolListEntry<'de>>,
+    entries: Vec<SymbolListEntry<'de>>,
 }
 
-impl Default for SymbolList<'_> {
+impl Default for SymbolList<'_> {
     #[inline]
     fn default() -> Self {
         Self::new()
     }
 }
 
-impl<'de> SymbolList<'de> {
+impl<'de> SymbolList<'de> {
     /// Returns a new, empty symbol list.
     #[inline]
     #[must_use]
@@ -2442,7 +2454,7 @@
 
     /// Push a symbol that has been borrowed from the deserialization source.
     #[inline]
-    pub fn push_borrowed(&mut self, borrowed: &'de str) {
+    pub fn push_borrowed(&mut self, borrowed: &'de str) {
         self.entries.push(SymbolListEntry::Borrowed(borrowed));
     }
 
@@ -2456,7 +2468,7 @@
     }
 
     #[inline]
-    fn resolve_entry(&self, entry: &SymbolListEntry<'de>) -> SymbolStr<'de, '_> {
+    fn resolve_entry(&self, entry: &SymbolListEntry<'de>) -> SymbolStr<'de, '_> {
         match entry {
             SymbolListEntry::Buffer(range) => SymbolStr::InList(&self.buffer[range.clone()]),
             SymbolListEntry::Borrowed(str) => SymbolStr::Data(str),
@@ -2467,7 +2479,7 @@
     /// bounds.
     #[inline]
     #[must_use]
-    pub fn get(&self, index: usize) -> Option<SymbolStr<'de, '_>> {
+    pub fn get(&self, index: usize) -> Option<SymbolStr<'de, '_>> {
         self.entries
             .get(index)
             .map(|entry| self.resolve_entry(entry))
@@ -2490,7 +2502,7 @@
 
 /// An alias to a [`SymbolList`] with a static lifetime. This type persists
 /// symbols referenced across multiple deserialization sessions.
-pub type SymbolMap = SymbolList<'static>;
+pub type SymbolMap = SymbolList<'static>;
 
 impl SymbolMap {
     /// Returns a deserializer for `slice` that reuses symbol ids.
@@ -2498,10 +2510,10 @@
     /// This should only be used with data generated by using a persistent
     /// [`ser::SymbolMap`](crate::ser::SymbolMap).
     #[inline]
-    pub fn deserializer_for_slice<'a, 'de>(
-        &'a mut self,
-        slice: &'de [u8],
-    ) -> Result<Deserializer<'a, 'de, SliceReader<'de>>> {
+    pub fn deserializer_for_slice<'a, 'de>(
+        &'a mut self,
+        slice: &'de [u8],
+    ) -> Result<Deserializer<'a, 'de, SliceReader<'de>>> {
         Deserializer::from_slice_with_symbols(slice, self.persistent(), usize::MAX)
     }
 
@@ -2510,10 +2522,10 @@
     /// This should only be used with data generated by using a persistent
     /// [`ser::SymbolMap`](crate::ser::SymbolMap).
     #[inline]
-    pub fn deserializer_for<'de, R>(
+    pub fn deserializer_for<'de, R>(
         &mut self,
         reader: R,
-    ) -> Result<Deserializer<'_, 'de, IoReader<R>>>
+    ) -> Result<Deserializer<'_, 'de, IoReader<R>>>
     where
         R: Read,
     {
@@ -2524,9 +2536,9 @@
     ///
     /// This should only be used with data generated by using a persistent
     /// [`ser::SymbolMap`](crate::ser::SymbolMap).
-    pub fn deserialize_slice<'de, T>(&mut self, slice: &'de [u8]) -> Result<T>
+    pub fn deserialize_slice<'de, T>(&mut self, slice: &'de [u8]) -> Result<T>
     where
-        T: Deserialize<'de>,
+        T: Deserialize<'de>,
     {
         T::deserialize(&mut self.deserializer_for_slice(slice)?)
     }
@@ -2535,15 +2547,15 @@
     ///
     /// This should only be used with data generated by using a persistent
     /// [`ser::SymbolMap`](crate::ser::SymbolMap).
-    pub fn deserialize_from<'de, T>(&mut self, reader: impl Read) -> Result<T>
+    pub fn deserialize_from<'de, T>(&mut self, reader: impl Read) -> Result<T>
     where
-        T: Deserialize<'de>,
+        T: Deserialize<'de>,
     {
         T::deserialize(&mut self.deserializer_for(reader)?)
     }
 
     #[must_use]
-    fn persistent<'de>(&mut self) -> SymbolMapRef<'_, 'de> {
+    fn persistent<'de>(&mut self) -> SymbolMapRef<'_, 'de> {
         SymbolMapRef(SymbolMapRefPrivate::Persistent(self))
     }
 }
@@ -2561,10 +2573,10 @@
     }
 }
 
-impl<'de> Deserialize<'de> for SymbolMap {
+impl<'de> Deserialize<'de> for SymbolMap {
     fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
     where
-        D: serde::Deserializer<'de>,
+        D: serde::Deserializer<'de>,
     {
         deserializer.deserialize_seq(SymbolMapVisitor)
     }
@@ -2572,22 +2584,22 @@
 
 struct SymbolMapVisitor;
 
-impl<'de> Visitor<'de> for SymbolMapVisitor {
+impl<'de> Visitor<'de> for SymbolMapVisitor {
     type Value = SymbolMap;
 
-    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        formatter.write_str("symbol map")
+    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        formatter.write_str("symbol map")
     }
 
     fn visit_seq<A>(self, mut seq: A) -> std::result::Result<Self::Value, A::Error>
     where
-        A: SeqAccess<'de>,
+        A: SeqAccess<'de>,
     {
         let mut map = SymbolMap::new();
         if let Some(hint) = seq.size_hint() {
             map.entries.reserve(hint);
         }
-        while let Some(element) = seq.next_element::<Cow<'_, str>>()? {
+        while let Some(element) = seq.next_element::<Cow<'_, str>>()? {
             map.push(&element);
         }
         Ok(map)
@@ -2595,14 +2607,14 @@
 }
 
 /// A symbol stored in a [`SymbolList`].
-pub enum SymbolStr<'de, 'ephemeral> {
+pub enum SymbolStr<'de, 'ephemeral> {
     /// A symbol that has been borrowed from the data being deserialized.
-    Data(&'de str),
+    Data(&'de str),
     /// A symbol that is stored inside of the [`SymbolList`].
-    InList(&'ephemeral str),
+    InList(&'ephemeral str),
 }
 
-impl Deref for SymbolStr<'_, '_> {
+impl Deref for SymbolStr<'_, '_> {
     type Target = str;
 
     #[inline]
@@ -2614,8 +2626,8 @@
 }
 
 #[derive(Debug, Clone)]
-enum SymbolListEntry<'de> {
+enum SymbolListEntry<'de> {
     Buffer(Range<usize>),
-    Borrowed(&'de str),
+    Borrowed(&'de str),
 }
 
\ No newline at end of file diff --git a/main/src/pot/error.rs.html b/main/src/pot/error.rs.html index 3d1e2fc5..b32777b3 100644 --- a/main/src/pot/error.rs.html +++ b/main/src/pot/error.rs.html @@ -1,4 +1,4 @@ -error.rs - source
1
+error.rs - source
1
 2
 3
 4
@@ -162,31 +162,31 @@
 }
 
 impl Display for Error {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         match self {
-            Error::NotAPot => f.write_str("not a pot: invalid header"),
-            Error::IncompatibleVersion => f.write_str("incompatible version"),
+            Error::NotAPot => f.write_str("not a pot: invalid header"),
+            Error::IncompatibleVersion => f.write_str("incompatible version"),
             Error::Message(message) => f.write_str(message),
-            Error::TrailingBytes => f.write_str("extra data at end of input"),
-            Error::Eof => f.write_str("unexpected end of file"),
-            Error::ImpreciseCastWouldLoseData => f.write_str("numerical data cannot fit"),
-            Error::Io(io) => write!(f, "io error: {io}"),
+            Error::TrailingBytes => f.write_str("extra data at end of input"),
+            Error::Eof => f.write_str("unexpected end of file"),
+            Error::ImpreciseCastWouldLoseData => f.write_str("numerical data cannot fit"),
+            Error::Io(io) => write!(f, "io error: {io}"),
             Error::SequenceSizeMustBeKnown => {
-                f.write_str("serializing sequences of unknown size is unsupported")
+                f.write_str("serializing sequences of unknown size is unsupported")
             }
-            Error::InvalidUtf8(err) => write!(f, "invalid utf8: {err}"),
-            Error::InvalidKind(kind) => write!(f, "invalid kind: {kind}"),
+            Error::InvalidUtf8(err) => write!(f, "invalid utf8: {err}"),
+            Error::InvalidKind(kind) => write!(f, "invalid kind: {kind}"),
             Error::UnexpectedKind(encountered, expected) => write!(
                 f,
-                "encountered atom kind {encountered:?}, expected {expected:?}"
+                "encountered atom kind {encountered:?}, expected {expected:?}"
             ),
-            Error::UnknownSymbol(sym) => write!(f, "unknown symbol {sym}"),
-            Error::InvalidAtomHeader => f.write_str("an atom header was incorrectly formatted"),
+            Error::UnknownSymbol(sym) => write!(f, "unknown symbol {sym}"),
+            Error::InvalidAtomHeader => f.write_str("an atom header was incorrectly formatted"),
             Error::TooManyBytesRead => {
-                f.write_str("the deserialized value is larger than the allowed allocation limit")
+                f.write_str("the deserialized value is larger than the allowed allocation limit")
             }
             Error::UnsupportedByteCount(kind, count) => {
-                write!(f, "unexpected {kind:?} byte count ({count})")
+                write!(f, "unexpected {kind:?} byte count ({count})")
             }
             Error::UnknownSpecial(err) => Display::fmt(err, f),
         }
diff --git a/main/src/pot/format.rs.html b/main/src/pot/format.rs.html
index 56f2e59c..8c8bf187 100644
--- a/main/src/pot/format.rs.html
+++ b/main/src/pot/format.rs.html
@@ -1,4 +1,4 @@
-format.rs - source
1
+format.rs - source
1
 2
 3
 4
@@ -1838,12 +1838,16 @@
 1838
 1839
 1840
+1841
+1842
 
use std::fmt::Display;
 
 use byteorder::{BigEndian, LittleEndian, ReadBytesExt, WriteBytesExt};
 use half::f16;
 
-pub(crate) const CURRENT_VERSION: u8 = 0;
+pub(crate) const INITIAL_VERSION: u8 = 0;
+pub(crate) const V4_VERSION: u8 = 1;
+pub(crate) const CURRENT_VERSION: u8 = V4_VERSION;
 
 use crate::reader::{BufferedBytes, Reader};
 use crate::Error;
@@ -1880,7 +1884,7 @@
         // Kind is the 3 bits.
         let mut first_byte = (kind as u8) << 5;
         // The last 4 bits are the first 4 bits of the arg. We also know
-        // that we're longer than one byte, due to the original match.
+        // that we're longer than one byte, due to the original match.
         first_byte |= arg as u8 & 0b1111;
         arg >>= 4;
         first_byte |= 0b10000;
@@ -2079,7 +2083,7 @@
 fn unknown_special() {
     let err = Special::try_from(u64::MAX).unwrap_err();
     assert_eq!(err, UnknownSpecial(u64::MAX));
-    assert!(err.to_string().contains("unknown special"));
+    assert!(err.to_string().contains("unknown special"));
 }
 
 /// An unknown [`Special`] was encountered.
@@ -2087,13 +2091,13 @@
 pub struct UnknownSpecial(pub u64);
 
 impl Display for UnknownSpecial {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        write!(f, "unknown special id: {}", self.0)
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "unknown special id: {}", self.0)
     }
 }
 
 /// Writes the Pot header. A u32 written in big endian. The first three bytes
-/// are 'Pot' (`0x506F74`), and the fourth byte is the version. The first
+/// are 'Pot' (`0x506F74`), and the fourth byte is the version. The first
 /// version of Pot is 0.
 #[inline]
 pub fn write_header<W: WriteBytesExt>(mut writer: W, version: u8) -> std::io::Result<usize> {
@@ -2414,7 +2418,7 @@
 }
 
 impl Display for Integer {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         match &self.0 {
             InnerInteger::I8(value) => Display::fmt(value, f),
             InnerInteger::I16(value) => Display::fmt(value, f),
@@ -2450,7 +2454,7 @@
     }
 
     /// Returns the contained value as an i8, or an error if the value is unable to fit.
-    // clippy::checked_conversions: try_from isn't const, and it would demote this from a const fn.
+    // clippy::checked_conversions: try_from isn't const, and it would demote this from a const fn.
     #[allow(clippy::cast_possible_wrap)]
     #[allow(clippy::checked_conversions)]
     #[inline]
@@ -2830,7 +2834,7 @@
     }
 }
 
-macro_rules! impl_from_unsigned_integer {
+macro_rules! impl_from_unsigned_integer {
     ($primitive:ty, $smaller_primitive:ty, $variant:ident) => {
         impl From<$primitive> for Integer {
             #[inline]
@@ -2857,7 +2861,7 @@
     }
 }
 
-macro_rules! impl_from_unsigned_integer {
+macro_rules! impl_from_unsigned_integer {
     ($primitive:ty, $smaller_primitive:ty, $smaller_unsigned_primitive:ty, $variant:ident) => {
         impl From<$primitive> for Integer {
             #[inline]
@@ -2882,11 +2886,11 @@
 /// Reads an atom.
 #[allow(clippy::cast_possible_truncation)]
 #[inline]
-pub fn read_atom<'de, R: Reader<'de>>(
+pub fn read_atom<'de, R: Reader<'de>>(
     reader: &mut R,
     remaining_budget: &mut usize,
     scratch: &mut Vec<u8>,
-) -> Result<Atom<'de>, Error> {
+) -> Result<Atom<'de>, Error> {
     let (kind, arg) = read_atom_header(reader)?;
     Ok(match kind {
         Kind::Sequence | Kind::Map | Kind::Symbol => Atom {
@@ -2960,13 +2964,13 @@
 
 /// An encoded [`Kind`], argument, and optional contained value.
 #[derive(Debug)]
-pub struct Atom<'de> {
+pub struct Atom<'de> {
     /// The type of atom.
     pub kind: Kind,
     /// The argument contained in the atom header.
     pub arg: u64,
     /// The contained value, if any.
-    pub nucleus: Option<Nucleus<'de>>,
+    pub nucleus: Option<Nucleus<'de>>,
 }
 
 /// A floating point number that can safely convert between other number types using compile-time evaluation when possible.
@@ -3008,7 +3012,7 @@
 }
 
 impl Display for Float {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         match &self.0 {
             InnerFloat::F32(value) => Display::fmt(value, f),
             InnerFloat::F64(value) => Display::fmt(value, f),
@@ -3109,7 +3113,7 @@
 
 /// A value contained within an [`Atom`].
 #[derive(Debug)]
-pub enum Nucleus<'de> {
+pub enum Nucleus<'de> {
     /// A boolean value.
     Boolean(bool),
     /// An integer value.
@@ -3117,7 +3121,7 @@
     /// A floating point value.
     Float(Float),
     /// A buffer of bytes.
-    Bytes(BufferedBytes<'de>),
+    Bytes(BufferedBytes<'de>),
     /// A unit.
     Unit,
     /// A named value.
@@ -3177,7 +3181,7 @@
         for arg in 1..=64 {
             let arg = 2_u64.saturating_pow(arg);
             write_atom_header(&mut out, Kind::Map, arg).unwrap();
-            println!("header: {out:?}");
+            println!("header: {out:?}");
             let (kind, read_arg) = read_atom_header(&mut out.as_slice()).unwrap();
             assert_eq!(kind, Kind::Map);
             assert_eq!(read_arg, arg);
@@ -3360,12 +3364,12 @@
         assert!(!Integer::from(u128::MAX).is_zero());
     }
 
-    macro_rules! test_conversion_succeeds {
+    macro_rules! test_conversion_succeeds {
         ($host:ty, $value:expr, $method:ident) => {{
             assert!(<$host>::from($value).$method().is_ok())
         }};
     }
-    macro_rules! test_conversion_fails {
+    macro_rules! test_conversion_fails {
         ($host:ty, $value:expr, $method:ident) => {{
             assert!(matches!(
                 <$host>::from($value).$method(),
@@ -3377,7 +3381,7 @@
     #[test]
     #[allow(clippy::cognitive_complexity, clippy::too_many_lines)]
     fn integer_casts() {
-        macro_rules! test_negative_fails {
+        macro_rules! test_negative_fails {
             ($method:ident) => {{
                 test_conversion_fails!(Integer, i8::MIN, $method);
                 test_conversion_fails!(Integer, i16::MIN, $method);
@@ -3660,21 +3664,21 @@
 
     #[test]
     fn integer_display() {
-        assert_eq!(Integer::from(i8::MAX).to_string(), "127");
-        assert_eq!(Integer::from(i16::MAX).to_string(), "32767");
-        assert_eq!(Integer::from(i32::MAX).to_string(), "2147483647");
-        assert_eq!(Integer::from(i64::MAX).to_string(), "9223372036854775807");
+        assert_eq!(Integer::from(i8::MAX).to_string(), "127");
+        assert_eq!(Integer::from(i16::MAX).to_string(), "32767");
+        assert_eq!(Integer::from(i32::MAX).to_string(), "2147483647");
+        assert_eq!(Integer::from(i64::MAX).to_string(), "9223372036854775807");
         assert_eq!(
             Integer::from(i128::MAX).to_string(),
-            "170141183460469231731687303715884105727"
+            "170141183460469231731687303715884105727"
         );
-        assert_eq!(Integer::from(u8::MAX).to_string(), "255");
-        assert_eq!(Integer::from(u16::MAX).to_string(), "65535");
-        assert_eq!(Integer::from(u32::MAX).to_string(), "4294967295");
-        assert_eq!(Integer::from(u64::MAX).to_string(), "18446744073709551615");
+        assert_eq!(Integer::from(u8::MAX).to_string(), "255");
+        assert_eq!(Integer::from(u16::MAX).to_string(), "65535");
+        assert_eq!(Integer::from(u32::MAX).to_string(), "4294967295");
+        assert_eq!(Integer::from(u64::MAX).to_string(), "18446744073709551615");
         assert_eq!(
             Integer::from(u128::MAX).to_string(),
-            "340282366920938463463374607431768211455"
+            "340282366920938463463374607431768211455"
         );
     }
 }
diff --git a/main/src/pot/lib.rs.html b/main/src/pot/lib.rs.html
index a6ef6d99..3ee28581 100644
--- a/main/src/pot/lib.rs.html
+++ b/main/src/pot/lib.rs.html
@@ -1,4 +1,4 @@
-lib.rs - source
1
+lib.rs - source
1
 2
 3
 4
@@ -233,729 +233,7 @@
 233
 234
 235
-236
-237
-238
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-249
-250
-251
-252
-253
-254
-255
-256
-257
-258
-259
-260
-261
-262
-263
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-289
-290
-291
-292
-293
-294
-295
-296
-297
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-316
-317
-318
-319
-320
-321
-322
-323
-324
-325
-326
-327
-328
-329
-330
-331
-332
-333
-334
-335
-336
-337
-338
-339
-340
-341
-342
-343
-344
-345
-346
-347
-348
-349
-350
-351
-352
-353
-354
-355
-356
-357
-358
-359
-360
-361
-362
-363
-364
-365
-366
-367
-368
-369
-370
-371
-372
-373
-374
-375
-376
-377
-378
-379
-380
-381
-382
-383
-384
-385
-386
-387
-388
-389
-390
-391
-392
-393
-394
-395
-396
-397
-398
-399
-400
-401
-402
-403
-404
-405
-406
-407
-408
-409
-410
-411
-412
-413
-414
-415
-416
-417
-418
-419
-420
-421
-422
-423
-424
-425
-426
-427
-428
-429
-430
-431
-432
-433
-434
-435
-436
-437
-438
-439
-440
-441
-442
-443
-444
-445
-446
-447
-448
-449
-450
-451
-452
-453
-454
-455
-456
-457
-458
-459
-460
-461
-462
-463
-464
-465
-466
-467
-468
-469
-470
-471
-472
-473
-474
-475
-476
-477
-478
-479
-480
-481
-482
-483
-484
-485
-486
-487
-488
-489
-490
-491
-492
-493
-494
-495
-496
-497
-498
-499
-500
-501
-502
-503
-504
-505
-506
-507
-508
-509
-510
-511
-512
-513
-514
-515
-516
-517
-518
-519
-520
-521
-522
-523
-524
-525
-526
-527
-528
-529
-530
-531
-532
-533
-534
-535
-536
-537
-538
-539
-540
-541
-542
-543
-544
-545
-546
-547
-548
-549
-550
-551
-552
-553
-554
-555
-556
-557
-558
-559
-560
-561
-562
-563
-564
-565
-566
-567
-568
-569
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
-586
-587
-588
-589
-590
-591
-592
-593
-594
-595
-596
-597
-598
-599
-600
-601
-602
-603
-604
-605
-606
-607
-608
-609
-610
-611
-612
-613
-614
-615
-616
-617
-618
-619
-620
-621
-622
-623
-624
-625
-626
-627
-628
-629
-630
-631
-632
-633
-634
-635
-636
-637
-638
-639
-640
-641
-642
-643
-644
-645
-646
-647
-648
-649
-650
-651
-652
-653
-654
-655
-656
-657
-658
-659
-660
-661
-662
-663
-664
-665
-666
-667
-668
-669
-670
-671
-672
-673
-674
-675
-676
-677
-678
-679
-680
-681
-682
-683
-684
-685
-686
-687
-688
-689
-690
-691
-692
-693
-694
-695
-696
-697
-698
-699
-700
-701
-702
-703
-704
-705
-706
-707
-708
-709
-710
-711
-712
-713
-714
-715
-716
-717
-718
-719
-720
-721
-722
-723
-724
-725
-726
-727
-728
-729
-730
-731
-732
-733
-734
-735
-736
-737
-738
-739
-740
-741
-742
-743
-744
-745
-746
-747
-748
-749
-750
-751
-752
-753
-754
-755
-756
-757
-758
-759
-760
-761
-762
-763
-764
-765
-766
-767
-768
-769
-770
-771
-772
-773
-774
-775
-776
-777
-778
-779
-780
-781
-782
-783
-784
-785
-786
-787
-788
-789
-790
-791
-792
-793
-794
-795
-796
-797
-798
-799
-800
-801
-802
-803
-804
-805
-806
-807
-808
-809
-810
-811
-812
-813
-814
-815
-816
-817
-818
-819
-820
-821
-822
-823
-824
-825
-826
-827
-828
-829
-830
-831
-832
-833
-834
-835
-836
-837
-838
-839
-840
-841
-842
-843
-844
-845
-846
-847
-848
-849
-850
-851
-852
-853
-854
-855
-856
-857
-858
-859
-860
-861
-862
-863
-864
-865
-866
-867
-868
-869
-870
-871
-872
-873
-874
-875
-876
-877
-878
-879
-880
-881
-882
-883
-884
-885
-886
-887
-888
-889
-890
-891
-892
-893
-894
-895
-896
-897
-898
-899
-900
-901
-902
-903
-904
-905
-906
-907
-908
-909
-910
-911
-912
-913
-914
-915
-916
-917
-918
-919
-920
-921
-922
-923
-924
-925
-926
-927
-928
-929
-930
-931
-932
-933
-934
-935
-936
-937
-938
-939
-940
-941
-942
-943
-944
-945
-946
-947
-948
-949
-950
-951
-952
-953
-954
-955
-956
-957
-
#![doc = include_str!("../crate-docs.md")]
+
#![doc = include_str!("../crate-docs.md")]
 #![forbid(unsafe_code)]
 #![warn(
     clippy::cargo,
@@ -999,9 +277,9 @@
 /// Serialize `value` using Pot into a `Vec<u8>`.
 ///
 /// ```rust
-/// let serialized = pot::to_vec(&"hello world").unwrap();
+/// let serialized = pot::to_vec(&"hello world").unwrap();
 /// let deserialized = pot::from_slice::<String>(&serialized).unwrap();
-/// assert_eq!(deserialized, "hello world");
+/// assert_eq!(deserialized, "hello world");
 /// ```
 #[inline]
 pub fn to_vec<T>(value: &T) -> Result<Vec<u8>>
@@ -1015,9 +293,9 @@
 ///
 /// ```rust
 /// let mut serialized = Vec::new();
-/// pot::to_writer(&"hello world", &mut serialized).unwrap();
+/// pot::to_writer(&"hello world", &mut serialized).unwrap();
 /// let deserialized = pot::from_reader::<String, _>(&serialized[..]).unwrap();
-/// assert_eq!(deserialized, "hello world");
+/// assert_eq!(deserialized, "hello world");
 /// ```
 #[inline]
 pub fn to_writer<T, W>(value: &T, writer: W) -> Result<()>
@@ -1031,14 +309,14 @@
 /// Restores a previously Pot-serialized value from a slice.
 ///
 /// ```rust
-/// let serialized = pot::to_vec(&"hello world").unwrap();
+/// let serialized = pot::to_vec(&"hello world").unwrap();
 /// let deserialized = pot::from_slice::<String>(&serialized).unwrap();
-/// assert_eq!(deserialized, "hello world");
+/// assert_eq!(deserialized, "hello world");
 /// ```
 #[inline]
-pub fn from_slice<'a, T>(serialized: &'a [u8]) -> Result<T>
+pub fn from_slice<'a, T>(serialized: &'a [u8]) -> Result<T>
 where
-    T: Deserialize<'a>,
+    T: Deserialize<'a>,
 {
     Config::default().deserialize(serialized)
 }
@@ -1047,9 +325,9 @@
 ///
 /// ```rust
 /// let mut serialized = Vec::new();
-/// pot::to_writer(&"hello world", &mut serialized).unwrap();
+/// pot::to_writer(&"hello world", &mut serialized).unwrap();
 /// let deserialized = pot::from_reader::<String, _>(&serialized[..]).unwrap();
-/// assert_eq!(deserialized, "hello world");
+/// assert_eq!(deserialized, "hello world");
 /// ```
 #[inline]
 pub fn from_reader<T, R>(reader: R) -> Result<T>
@@ -1065,18 +343,24 @@
 #[derive(Clone, Debug)]
 pub struct Config {
     allocation_budget: usize,
+    compatibility: Compatibility,
 }
 
 impl Default for Config {
     #[inline]
     fn default() -> Self {
-        Self {
-            allocation_budget: usize::MAX,
-        }
+        Self::new()
     }
 }
 
 impl Config {
+    /// Returns the default configuration.
+    pub const fn new() -> Self {
+        Self {
+            allocation_budget: usize::MAX,
+            compatibility: Compatibility::const_default(),
+        }
+    }
     /// Sets the maximum number of bytes able to be allocated. This is not
     /// guaranteed to be perfectly accurate, due to the limitations of serde
     /// deserializers. Pot can keep track of how many bytes it thinks its
@@ -1090,11 +374,17 @@
         self
     }
 
+    /// Sets the compatibility mode for serializing and returns self.
+    pub const fn compatibility(mut self, compatibilty: Compatibility) -> Self {
+        self.compatibility = compatibilty;
+        self
+    }
+
     /// Deserializes a value from a slice using the configured options.
     #[inline]
-    pub fn deserialize<'de, T>(&self, serialized: &'de [u8]) -> Result<T>
+    pub fn deserialize<'de, T>(&self, serialized: &'de [u8]) -> Result<T>
     where
-        T: Deserialize<'de>,
+        T: Deserialize<'de>,
     {
         let mut deserializer = de::Deserializer::from_slice(serialized, self.allocation_budget)?;
         let t = T::deserialize(&mut deserializer)?;
@@ -1136,780 +426,46 @@
         T: Serialize,
         W: WriteBytesExt,
     {
-        let mut serializer = ser::Serializer::new(writer)?;
+        let mut serializer = ser::Serializer::new_with_compatibility(writer, self.compatibility)?;
         value.serialize(&mut serializer)
     }
 }
 
-#[cfg(test)]
-mod tests {
-    use std::borrow::Cow;
-    use std::marker::PhantomData;
-    use std::sync::OnceLock;
-
-    use serde::{Deserializer, Serializer};
-    use serde_derive::{Deserialize, Serialize};
-
-    use super::*;
-    use crate::format::{Float, Integer, CURRENT_VERSION};
-    use crate::value::Value;
-
-    fn init_tracing() {
-        static INITIALIZED: OnceLock<()> = OnceLock::new();
-
-        INITIALIZED.get_or_init(|| {
-            #[cfg(not(feature = "tracing"))]
-            println!("To see additional logs, run tests with the `tracing` feature enabled");
-
-            tracing_subscriber::fmt()
-                .pretty()
-                // Enable everything.
-                .with_max_level(tracing::Level::TRACE)
-                .with_span_events(tracing_subscriber::fmt::format::FmtSpan::ENTER)
-                // Set this to be the default, global collector for this application.
-                .init();
-        });
-    }
-
-    fn test_serialization<S: Serialize + for<'de> Deserialize<'de> + PartialEq + Debug>(
-        value: &S,
-        check_length: Option<usize>,
-    ) {
-        test_serialization_with(value, check_length, |value, deserialized| {
-            assert_eq!(value, deserialized);
-        });
-    }
-
-    fn test_serialization_with<
-        S: Serialize + for<'de> Deserialize<'de> + PartialEq + Debug,
-        F: FnMut(&S, &S),
-    >(
-        value: &S,
-        check_length: Option<usize>,
-        mut callback: F,
-    ) {
-        init_tracing();
-        let bytes = to_vec(&value).unwrap();
-        println!("{value:?}: {bytes:02x?}");
-        let deserialized = from_slice::<S>(&bytes).unwrap();
-        callback(value, &deserialized);
-        if let Some(check_length) = check_length {
-            // Subtract 4 bytes from the serialized output to account for the header.
-            assert_eq!(bytes.len() - 4, check_length);
-        }
-
-        // Do the same, but using the reader interface.
-        let mut bytes = Vec::new();
-        to_writer(value, &mut bytes).unwrap();
-        println!("{value:?}: {bytes:02x?}");
-        let deserialized = from_reader(&bytes[..]).unwrap();
-        callback(value, &deserialized);
-    }
-
-    use std::fmt::Debug;
-
-    #[derive(Serialize, PartialEq, Deserialize, Debug, Default)]
-    struct NumbersStruct {
-        u8: u8,
-        u16: u16,
-        char: char,
-        u32: u32,
-        u64: u64,
-        u128: u128,
-        i8: i8,
-        i16: i16,
-        i32: i32,
-        i64: i64,
-        i128: i128,
-        f32: f32,
-        f64: f64,
-    }
-
-    #[derive(Serialize, PartialEq, Deserialize, Debug)]
-    enum EnumVariants {
-        Unit,
-        Tuple(u64),
-        TupleTwoArgs(u64, u64),
-        Struct { arg: u64 },
-    }
-
-    #[test]
-    fn numbers() {
-        test_serialization(&NumbersStruct::default(), None);
-        test_serialization(
-            &NumbersStruct {
-                u8: u8::MAX,
-                u16: u16::MAX,
-                char: char::MAX,
-                u32: u32::MAX,
-                u64: u64::MAX,
-                u128: u128::MAX,
-                i8: i8::MIN,
-                i16: i16::MIN,
-                i32: i32::MIN,
-                i64: i64::MIN,
-                i128: i128::MIN,
-                f32: 1.,
-                f64: 1.,
-            },
-            None,
-        );
-    }
-
-    #[test]
-    fn number_packing() {
-        test_serialization(&0_u128, Some(2));
-        test_serialization(&(2_u128.pow(8) - 1), Some(2));
-        test_serialization(&2_u128.pow(8), Some(3));
-        test_serialization(&(2_u128.pow(16) - 1), Some(3));
-        test_serialization(&2_u128.pow(16), Some(4));
-        test_serialization(&(2_u128.pow(24) - 1), Some(4));
-        test_serialization(&2_u128.pow(24), Some(5));
-        test_serialization(&(2_u128.pow(32) - 1), Some(5));
-        test_serialization(&2_u128.pow(32), Some(7));
-        test_serialization(&(2_u128.pow(48) - 1), Some(7));
-        test_serialization(&2_u128.pow(48), Some(9));
-        test_serialization(&(2_u128.pow(64) - 1), Some(9));
-        test_serialization(&2_u128.pow(64), Some(17));
-
-        test_serialization(&0_i128, Some(2));
-        test_serialization(&(2_i128.pow(7) - 1), Some(2));
-        test_serialization(&2_i128.pow(7), Some(3));
-        test_serialization(&(2_i128.pow(15) - 1), Some(3));
-        test_serialization(&2_i128.pow(15), Some(4));
-        test_serialization(&(2_i128.pow(23) - 1), Some(4));
-        test_serialization(&2_i128.pow(23), Some(5));
-        test_serialization(&(2_i128.pow(31) - 1), Some(5));
-        test_serialization(&2_i128.pow(31), Some(7));
-        test_serialization(&(2_i128.pow(47) - 1), Some(7));
-        test_serialization(&2_i128.pow(47), Some(9));
-        test_serialization(&-(2_i128.pow(7)), Some(2));
-        test_serialization(&-(2_i128.pow(7) + 1), Some(3));
-        test_serialization(&-(2_i128.pow(15)), Some(3));
-        test_serialization(&-(2_i128.pow(15) + 1), Some(4));
-        test_serialization(&-(2_i128.pow(23)), Some(4));
-        test_serialization(&-(2_i128.pow(23) + 1), Some(5));
-        test_serialization(&-(2_i128.pow(31)), Some(5));
-        test_serialization(&-(2_i128.pow(31) + 1), Some(7));
-        test_serialization(&-(2_i128.pow(47)), Some(7));
-        test_serialization(&-(2_i128.pow(47) + 1), Some(9));
-        test_serialization(&-(2_i128.pow(63)), Some(9));
-        test_serialization(&-(2_i128.pow(63) + 1), Some(17));
-
-        // Float packing relies on bitwise conversions and is lossless.
-        test_serialization(&f64::INFINITY, Some(3));
-        test_serialization(&f64::NEG_INFINITY, Some(3));
-        test_serialization(&0_f64, Some(3));
-        test_serialization(&-0_f64, Some(3));
-        test_serialization(&0.1_f64, Some(9));
-        test_serialization(&0.1_f32, Some(5));
-    }
-
-    #[test]
-    fn tuples() {
-        test_serialization(&(1, true, 3), None);
-    }
-
-    #[test]
-    fn enums() {
-        test_serialization(&EnumVariants::Unit, None);
-
-        test_serialization(&EnumVariants::Tuple(0), None);
-
-        test_serialization(&EnumVariants::TupleTwoArgs(1, 2), None);
-
-        test_serialization(&EnumVariants::Struct { arg: 3 }, None);
-
-        test_serialization(&Some(EnumVariants::Unit), None);
-    }
-
-    #[test]
-    fn vectors() {
-        test_serialization(&vec![0_u64, 1], None);
-        test_serialization(
-            &vec![NumbersStruct::default(), NumbersStruct::default()],
-            None,
-        );
-    }
-
-    #[test]
-    fn option() {
-        test_serialization(&Option::<u64>::None, None);
-        test_serialization(&Some(0_u64), None);
-        test_serialization(&Some(u64::MAX), None);
-    }
-
-    #[test]
-    fn phantom() {
-        test_serialization(&PhantomData::<u64>, None);
-    }
-
-    #[derive(Serialize, PartialEq, Deserialize, Debug, Default)]
-    struct StringsAndBytes<'a> {
-        bytes: Cow<'a, [u8]>,
-        #[serde(with = "serde_bytes")]
-        bytes_borrowed: Cow<'a, [u8]>,
-        #[serde(with = "serde_bytes")]
-        serde_bytes_byte_slice: &'a [u8],
-        #[serde(with = "serde_bytes")]
-        serde_bytes_byte_vec: Vec<u8>,
-        str_ref: &'a str,
-        string: String,
-    }
-
-    #[test]
-    fn borrowing_data() {
-        let original = StringsAndBytes {
-            bytes: Cow::Borrowed(b"hello"),
-            bytes_borrowed: Cow::Borrowed(b"hello"),
-            serde_bytes_byte_slice: b"hello",
-            serde_bytes_byte_vec: b"world".to_vec(),
-            str_ref: "hello",
-            string: String::from("world"),
-        };
-        let serialized = to_vec(&original).unwrap();
-        let deserialized = from_slice(&serialized).unwrap();
-        assert_eq!(original, deserialized);
-        assert!(matches!(deserialized.bytes_borrowed, Cow::Borrowed(_)));
-    }
-
-    #[test]
-    fn limiting_input() {
-        let original = StringsAndBytes {
-            bytes: Cow::Borrowed(b"hello"),
-            bytes_borrowed: Cow::Borrowed(b"hello"),
-            serde_bytes_byte_slice: b"hello",
-            serde_bytes_byte_vec: b"world".to_vec(),
-            str_ref: "hello",
-            string: String::from("world"),
-        };
-        let serialized = to_vec(&original).unwrap();
-        // There are 6 values that contain 5 bytes each. A limit of 30 should be perfect.
-        assert!(Config::default()
-            .allocation_budget(30)
-            .deserialize::<StringsAndBytes<'_>>(&serialized)
-            .is_ok());
-        assert!(Config::default()
-            .allocation_budget(29)
-            .deserialize::<StringsAndBytes<'_>>(&serialized)
-            .is_err());
-
-        // Test number limits.
-        let serialized = to_vec(&NumbersStruct {
-            u8: u8::MAX,
-            u16: u16::MAX,
-            char: char::MAX,
-            u32: u32::MAX,
-            u64: u64::MAX,
-            u128: u128::MAX,
-            i8: i8::MIN,
-            i16: i16::MIN,
-            i32: i32::MIN,
-            i64: i64::MIN,
-            i128: i128::MIN,
-            f32: f32::MAX,
-            f64: f64::MIN,
-        })
-        .unwrap();
-        assert!(Config::default()
-            .allocation_budget(78)
-            .deserialize::<NumbersStruct>(&serialized)
-            .is_ok());
-        assert!(Config::default()
-            .allocation_budget(77)
-            .deserialize::<NumbersStruct>(&serialized)
-            .is_err());
-    }
-
-    #[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]
-    struct TupleStruct(u32, u8);
-
-    #[test]
-    fn tuple_struct() {
-        test_serialization(&TupleStruct(1, 2), None);
-    }
-
-    #[test]
-    fn value() {
-        macro_rules! roundtrip {
-            ($value:expr) => {{
-                assert_eq!(
-                    from_slice::<Value<'_>>(&to_vec(&$value).unwrap()).unwrap(),
-                    $value
-                );
-            }};
-        }
-
-        roundtrip!(Value::None);
-        roundtrip!(Value::Unit);
-        roundtrip!(Value::Bool(true));
-        roundtrip!(Value::Bool(false));
-        roundtrip!(Value::Integer(Integer::from(i8::MAX)));
-        roundtrip!(Value::Integer(Integer::from(i16::MAX)));
-        roundtrip!(Value::Integer(Integer::from(i32::MAX)));
-        roundtrip!(Value::Integer(Integer::from(i64::MAX)));
-        roundtrip!(Value::Integer(Integer::from(i128::MAX)));
-        roundtrip!(Value::Integer(Integer::from(u8::MAX)));
-        roundtrip!(Value::Integer(Integer::from(u16::MAX)));
-        roundtrip!(Value::Integer(Integer::from(u32::MAX)));
-        roundtrip!(Value::Integer(Integer::from(u64::MAX)));
-        roundtrip!(Value::Integer(Integer::from(u128::MAX)));
-        roundtrip!(Value::Float(Float::from(std::f64::consts::PI)));
-        roundtrip!(Value::Float(Float::from(std::f32::consts::PI)));
-        roundtrip!(Value::Sequence(vec![Value::None]));
-        roundtrip!(Value::Mappings(vec![(Value::None, Value::Unit)]));
-
-        let original_value = Value::Bytes(Cow::Borrowed(b"hello"));
-        let encoded_bytes = to_vec(&original_value).unwrap();
-        let borrowed_decoded: Value<'_> = from_slice(&encoded_bytes).unwrap();
-        assert_eq!(Value::String(Cow::Borrowed("hello")), borrowed_decoded);
-        assert!(matches!(borrowed_decoded, Value::String(Cow::Borrowed(_))));
-
-        let original_value = Value::Bytes(Cow::Borrowed(b"\xFE\xED\xD0\xD0"));
-        let encoded_bytes = to_vec(&original_value).unwrap();
-        let borrowed_decoded: Value<'_> = from_slice(&encoded_bytes).unwrap();
-        assert_eq!(
-            Value::Bytes(Cow::Borrowed(b"\xFE\xED\xD0\xD0")),
-            borrowed_decoded
-        );
-        assert!(matches!(borrowed_decoded, Value::Bytes(Cow::Borrowed(_))));
-    }
-
-    #[test]
-    fn incompatible_version() {
-        let mut incompatible_header = Vec::new();
-        format::write_header(&mut incompatible_header, CURRENT_VERSION + 1).unwrap();
-        assert!(matches!(
-            from_slice::<()>(&incompatible_header),
-            Err(Error::IncompatibleVersion)
-        ));
-    }
-
-    #[test]
-    fn invalid_char_cast() {
-        let bytes = to_vec(&0x11_0000_u32).unwrap();
-
-        assert!(matches!(
-            from_slice::<char>(&bytes),
-            Err(Error::InvalidUtf8(_))
-        ));
-    }
-
-    #[test]
-    fn bytes_to_identifier() {
-        let mut valid_bytes = Vec::new();
-        format::write_header(&mut valid_bytes, CURRENT_VERSION).unwrap();
-        format::write_named(&mut valid_bytes).unwrap();
-        format::write_bytes(&mut valid_bytes, b"Unit").unwrap();
-
-        assert_eq!(
-            from_slice::<EnumVariants>(&valid_bytes).unwrap(),
-            EnumVariants::Unit
-        );
-
-        let mut invalid_bytes = Vec::new();
-        format::write_header(&mut invalid_bytes, CURRENT_VERSION).unwrap();
-        format::write_named(&mut invalid_bytes).unwrap();
-        format::write_bytes(&mut invalid_bytes, &0xFFFF_FFFF_u32.to_be_bytes()).unwrap();
-
-        assert!(matches!(
-            from_slice::<EnumVariants>(&invalid_bytes),
-            Err(Error::InvalidUtf8(_))
-        ));
-    }
-
-    #[test]
-    fn invalid_symbol() {
-        let mut valid_bytes = Vec::new();
-        format::write_header(&mut valid_bytes, CURRENT_VERSION).unwrap();
-        format::write_atom_header(&mut valid_bytes, format::Kind::Symbol, 4).unwrap();
-        format::write_bytes(&mut valid_bytes, &0xFFFF_FFFF_u32.to_be_bytes()).unwrap();
-
-        assert!(matches!(
-            from_slice::<Value<'_>>(&valid_bytes),
-            Err(Error::InvalidUtf8(_))
-        ));
-    }
-
-    #[test]
-    fn unknown_special() {
-        let mut invalid_bytes = Vec::new();
-        format::write_header(&mut invalid_bytes, CURRENT_VERSION).unwrap();
-        format::write_atom_header(
-            &mut invalid_bytes,
-            format::Kind::Special,
-            format::SPECIAL_COUNT,
-        )
-        .unwrap();
-
-        assert!(from_slice::<()>(&invalid_bytes).is_err());
-    }
-
-    /// In `BonsaiDb`, sometimes it's nice to use a `()` as an associated type
-    /// as a default. To allow changing data that was previously serialized as a
-    /// `()` but now has a new type, Pot allows converting between unit types
-    /// and defaults of all major serialized types. The net effect is if you
-    /// start with a derived `BonsaiDb` view with no `value =` argument, `()` is
-    /// used instead. With this flexibility, changing the value type to another
-    /// type will sometimes be able to work without requiring rebuilding the
-    /// views on deployment.
-    #[test]
-    #[allow(clippy::cognitive_complexity)]
-    fn unit_adaptations() {
-        #[derive(Deserialize)]
-        struct Test {
-            #[serde(default)]
-            value: u32,
-        }
-
-        let unit = to_vec(&()).unwrap();
-        assert!(from_slice::<Option<()>>(&unit).unwrap().is_some());
-        assert_eq!(from_slice::<Test>(&unit).unwrap().value, 0);
-        assert_eq!(from_slice::<&[u8]>(&unit).unwrap(), b"");
-        assert_eq!(from_slice::<serde_bytes::ByteBuf>(&unit).unwrap(), b"");
-        assert_eq!(from_slice::<&str>(&unit).unwrap(), "");
-        assert_eq!(from_slice::<u8>(&unit).unwrap(), 0);
-        assert_eq!(from_slice::<u16>(&unit).unwrap(), 0);
-        assert_eq!(from_slice::<u32>(&unit).unwrap(), 0);
-        assert_eq!(from_slice::<u64>(&unit).unwrap(), 0);
-        assert_eq!(from_slice::<u128>(&unit).unwrap(), 0);
-        assert_eq!(from_slice::<i8>(&unit).unwrap(), 0);
-        assert_eq!(from_slice::<i16>(&unit).unwrap(), 0);
-        assert_eq!(from_slice::<i32>(&unit).unwrap(), 0);
-        assert_eq!(from_slice::<i64>(&unit).unwrap(), 0);
-        assert_eq!(from_slice::<i128>(&unit).unwrap(), 0);
-        assert!(!from_slice::<bool>(&unit).unwrap());
-
-        let none = to_vec(&Option::<()>::None).unwrap();
-        assert!(from_slice::<Option<()>>(&none).unwrap().is_none());
-        assert!(from_slice::<Option<Test>>(&none).unwrap().is_none());
-        assert_eq!(from_slice::<&[u8]>(&none).unwrap(), b"");
-        assert_eq!(from_slice::<serde_bytes::ByteBuf>(&none).unwrap(), b"");
-        assert_eq!(from_slice::<&str>(&none).unwrap(), "");
-        assert_eq!(from_slice::<u8>(&none).unwrap(), 0);
-        assert_eq!(from_slice::<u16>(&none).unwrap(), 0);
-        assert_eq!(from_slice::<u32>(&none).unwrap(), 0);
-        assert_eq!(from_slice::<u64>(&none).unwrap(), 0);
-        assert_eq!(from_slice::<u128>(&none).unwrap(), 0);
-        assert_eq!(from_slice::<i8>(&none).unwrap(), 0);
-        assert_eq!(from_slice::<i16>(&none).unwrap(), 0);
-        assert_eq!(from_slice::<i32>(&none).unwrap(), 0);
-        assert_eq!(from_slice::<i64>(&none).unwrap(), 0);
-        assert_eq!(from_slice::<i128>(&none).unwrap(), 0);
-        assert!(!from_slice::<bool>(&none).unwrap());
-    }
-
-    #[test]
-    fn invalid_numbers() {
-        let mut invalid_float_byte_len = Vec::new();
-        format::write_header(&mut invalid_float_byte_len, CURRENT_VERSION).unwrap();
-        format::write_atom_header(&mut invalid_float_byte_len, format::Kind::Float, 0).unwrap();
-
-        assert!(from_slice::<f32>(&invalid_float_byte_len).is_err());
-
-        assert!(format::Float::read_from(
-            format::Kind::Symbol,
-            0,
-            &mut &invalid_float_byte_len[..]
-        )
-        .is_err(),);
-
-        let mut invalid_signed_byte_len = Vec::new();
-        format::write_header(&mut invalid_signed_byte_len, CURRENT_VERSION).unwrap();
-        format::write_atom_header(&mut invalid_signed_byte_len, format::Kind::Int, 10).unwrap();
-
-        assert!(from_slice::<i32>(&invalid_signed_byte_len).is_err());
-
-        assert!(format::Integer::read_from(
-            format::Kind::Symbol,
-            0,
-            &mut &invalid_signed_byte_len[..]
-        )
-        .is_err(),);
-
-        let mut invalid_unsigned_byte_len = Vec::new();
-        format::write_header(&mut invalid_unsigned_byte_len, CURRENT_VERSION).unwrap();
-        format::write_atom_header(&mut invalid_unsigned_byte_len, format::Kind::UInt, 10).unwrap();
-
-        assert!(from_slice::<u32>(&invalid_unsigned_byte_len).is_err());
-    }
-
-    #[test]
-    #[allow(clippy::unnecessary_mut_passed)] // It's necessary.
-    fn not_human_readable() {
-        let mut bytes = Vec::new();
-        let mut serializer = ser::Serializer::new(&mut bytes).unwrap();
-        assert!(!(&mut serializer).is_human_readable());
-        ().serialize(&mut serializer).unwrap();
-
-        let bytes = to_vec(&()).unwrap();
-        let mut deserializer = de::Deserializer::from_slice(&bytes, usize::MAX).unwrap();
-        assert!(!(&mut deserializer).is_human_readable());
-    }
-
-    #[test]
-    fn unexpected_eof() {
-        let mut invalid_bytes = Vec::new();
-        format::write_header(&mut invalid_bytes, CURRENT_VERSION).unwrap();
-        format::write_atom_header(&mut invalid_bytes, format::Kind::Bytes, 10).unwrap();
-        assert!(matches!(
-            from_slice::<Vec<u8>>(&invalid_bytes),
-            Err(Error::Eof)
-        ));
-    }
-
-    #[test]
-    fn too_big_read() {
-        let mut invalid_bytes = Vec::new();
-        format::write_header(&mut invalid_bytes, CURRENT_VERSION).unwrap();
-        format::write_atom_header(&mut invalid_bytes, format::Kind::Bytes, 10).unwrap();
-        assert!(matches!(
-            Config::default()
-                .allocation_budget(9)
-                .deserialize::<Vec<u8>>(&invalid_bytes),
-            Err(Error::TooManyBytesRead)
-        ));
-    }
-
-    #[derive(Serialize, Deserialize, Debug, PartialEq)]
-    struct Flatten {
-        #[serde(flatten)]
-        structure: Flattened,
-        #[serde(flatten)]
-        enumeration: EnumVariants,
-    }
-
-    #[derive(Serialize, Deserialize, Debug, PartialEq)]
-    struct Flattened {
-        field: String,
-    }
-
-    #[test]
-    fn test_flatten() {
-        test_serialization(
-            &Flatten {
-                structure: Flattened {
-                    field: String::from("flat"),
-                },
-                enumeration: EnumVariants::Struct { arg: 1 },
-            },
-            None,
-        );
-    }
-
-    #[test]
-    fn direct_value_serialization() {
-        fn roundtrip<T: Serialize + for<'de> Deserialize<'de> + PartialEq + Debug>(value: &T) {
-            let as_value = Value::from_serialize(value).unwrap();
-            let deserialized = as_value.deserialize_as::<T>().unwrap();
-            assert_eq!(&deserialized, value);
-        }
-
-        roundtrip(&NumbersStruct {
-            u8: u8::MAX,
-            u16: u16::MAX,
-            char: char::MAX,
-            u32: u32::MAX,
-            u64: u64::MAX,
-            u128: u128::MAX,
-            i8: i8::MIN,
-            i16: i16::MIN,
-            i32: i32::MIN,
-            i64: i64::MIN,
-            i128: i128::MIN,
-            f32: f32::MAX,
-            f64: f64::MIN,
-        });
-
-        roundtrip(&EnumVariants::Struct { arg: 1 });
-        roundtrip(&EnumVariants::Tuple(1));
-        roundtrip(&EnumVariants::TupleTwoArgs(1, 2));
-        roundtrip(&EnumVariants::Unit);
-        roundtrip(&Some(1_u32));
-        roundtrip(&"hello".to_string());
-        roundtrip(&b"hello".to_vec());
-    }
-
-    #[test]
-    fn borrowed_value_serialization() {
-        #[track_caller]
-        fn check<T, U>(value: &T)
-        where
-            T: Serialize + Debug,
-            U: Debug + PartialEq<T> + for<'de> Deserialize<'de>,
-        {
-            let as_value = Value::from_serialize(value).unwrap();
-            let deserialized = as_value.deserialize_as::<U>().unwrap();
-            assert_eq!(&deserialized, value);
-        }
-
-        check::<_, Vec<u8>>(&b"hello");
-        check::<_, String>(&"hello");
-    }
-
-    #[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!")))
-        );
-    }
-
-    #[test]
-    fn persistent_symbols_slice() {
-        let mut sender = ser::SymbolMap::default();
-        let mut receiver = de::SymbolList::default();
-
-        let mut bytes = sender.serialize_to_vec(&NumbersStruct::default()).unwrap();
-        let _result = receiver.deserialize_slice::<NumbersStruct>(&bytes).unwrap();
-        let symbol_count_after_first_send = receiver.len();
-        let first_payload_len = bytes.len();
-
-        // Send again, confirm the symbol list didn't grow.
-        bytes.clear();
-        sender
-            .serialize_to(&mut bytes, &NumbersStruct::default())
-            .unwrap();
-        let _result = receiver.deserialize_slice::<NumbersStruct>(&bytes).unwrap();
-        assert_eq!(symbol_count_after_first_send, receiver.len());
-        println!(
-            "First: {first_payload_len} bytes; Second: {} bytes",
-            bytes.len()
-        );
-        assert!(first_payload_len > bytes.len());
-    }
-
-    #[test]
-    fn persistent_symbols_read() {
-        let mut sender = ser::SymbolMap::default();
-        let mut receiver = de::SymbolList::default();
-
-        let mut bytes = sender.serialize_to_vec(&NumbersStruct::default()).unwrap();
-        let _result = receiver
-            .deserialize_from::<NumbersStruct>(&bytes[..])
-            .unwrap();
-        let symbol_count_after_first_send = receiver.len();
-        let first_payload_len = bytes.len();
-
-        // Send again, confirm the symbol list didn't grow.
-        bytes.clear();
-        sender
-            .serialize_to(&mut bytes, &NumbersStruct::default())
-            .unwrap();
-        let _result = receiver
-            .deserialize_from::<NumbersStruct>(&bytes[..])
-            .unwrap();
-        assert_eq!(symbol_count_after_first_send, receiver.len());
-        println!(
-            "First: {first_payload_len} bytes; Second: {} bytes",
-            bytes.len()
-        );
-        assert!(first_payload_len > bytes.len());
-    }
-
-    #[test]
-    fn symbol_map_serialization() {
-        #[derive(Serialize, Deserialize, Default, Eq, PartialEq, Debug)]
-        struct Payload {
-            a: usize,
-            b: usize,
-        }
-
-        let mut sender = crate::ser::SymbolMap::default();
-        assert!(sender.is_empty());
-        let mut receiver = crate::de::SymbolMap::new();
-        assert!(receiver.is_empty());
-
-        // Send the first payload, populating the map.
-        let mut bytes = sender.serialize_to_vec(&Payload::default()).unwrap();
-        assert_eq!(sender.len(), 2);
-
-        assert_eq!(
-            receiver.deserialize_slice::<Payload>(&bytes).unwrap(),
-            Payload::default()
-        );
-        assert_eq!(receiver.len(), 2);
-
-        // Serialize the maps.
-        let serialized_sender = crate::to_vec(&sender).unwrap();
-        let serialized_receiver = crate::to_vec(&receiver).unwrap();
-        // The serialization formats are the same despite using different
-        // in-memory representations. This allows pre-serializing a dictionary
-        // before starting the intial payload.
-        assert_eq!(serialized_sender, serialized_receiver);
-        let mut deserialized_sender =
-            crate::from_slice::<crate::ser::SymbolMap>(&serialized_sender).unwrap();
-        let mut deserialized_receiver =
-            crate::from_slice::<crate::de::SymbolMap>(&serialized_receiver).unwrap();
-
-        // Create a new payload and serialize it. Ensure the payloads produced
-        // by the serialized map and the original map are identical.
-        let new_payload = Payload { a: 1, b: 2 };
-        bytes.clear();
-        sender.serialize_to(&mut bytes, &new_payload).unwrap();
-        let from_serialized_sender = deserialized_sender.serialize_to_vec(&new_payload).unwrap();
-        assert_eq!(bytes, from_serialized_sender);
-
-        // Deserialize the payload
-        assert_eq!(
-            receiver.deserialize_slice::<Payload>(&bytes).unwrap(),
-            new_payload
-        );
-        assert_eq!(
-            deserialized_receiver
-                .deserialize_slice::<Payload>(&bytes)
-                .unwrap(),
-            new_payload
-        );
-    }
+/// Compatibility settings for Pot.
+#[derive(Debug, Eq, PartialEq, Clone, Copy)]
+#[non_exhaustive]
+pub enum Compatibility {
+    /// Serializes data that is compatible with all versions of Pot
+    /// deserializers.
+    ///
+    /// This format does not support [`Value`](crate::Value) deserialization of
+    /// enum variants without associated data. See [`V5`](Self::V5) for more
+    /// information.
+    Full,
+    /// Serializes data in the default format
+    ///
+    /// This format has a single change in how enum variants without associated
+    /// data are serialized. This change allows `deserialize_any` to
+    /// unambiguously distinguish between variants with associated data and
+    /// variants without associated data.
+    ///
+    /// This will be the default compatibility setting in `v4.0` and later. All
+    /// versions after `v3.0.1` are able to read this updated format.
+    V4,
+}
 
-    #[test]
-    fn symbol_map_population() {
-        let mut map = crate::ser::SymbolMap::default();
-        map.populate_from(&NumbersStruct::default()).unwrap();
-        map.populate_from(&EnumVariants::Struct { arg: 1 }).unwrap();
-        map.populate_from(&EnumVariants::Tuple(0)).unwrap();
-        map.populate_from(&EnumVariants::TupleTwoArgs(0, 1))
-            .unwrap();
-        assert_eq!(map.populate_from(&EnumVariants::Unit).unwrap(), 1);
-        assert_eq!(map.populate_from(&EnumVariants::Unit).unwrap(), 0);
-        dbg!(map);
+impl Compatibility {
+    const fn const_default() -> Self {
+        Self::Full
     }
+}
 
-    #[test]
-    fn backwards_compatible() {
-        #[derive(Debug, Serialize, Deserialize, Eq, PartialEq)]
-        struct Canary {
-            name: String,
-            id: u64,
-        }
-
-        let canary = Canary {
-            name: String::from("coalmine"),
-            id: 0xfeed_d0d0_dead_beef,
-        };
-
-        // This payload was generated with pot 1.0 using the same structure.
-        // This structure should be updated to be more encompassing, but this at
-        // least tests for basic compatibility.
-        let v1_canary = [
-            80, 111, 116, 0, 162, 200, 110, 97, 109, 101, 232, 99, 111, 97, 108, 109, 105, 110,
-            101, 196, 105, 100, 71, 239, 190, 173, 222, 208, 208, 237, 254,
-        ];
-        let parsed: Canary = crate::from_slice(&v1_canary).unwrap();
-        assert_eq!(canary, parsed);
+impl Default for Compatibility {
+    fn default() -> Self {
+        Self::const_default()
     }
 }
+
+#[cfg(test)]
+mod tests;
 
\ No newline at end of file diff --git a/main/src/pot/reader.rs.html b/main/src/pot/reader.rs.html index 51881b6d..51f90142 100644 --- a/main/src/pot/reader.rs.html +++ b/main/src/pot/reader.rs.html @@ -1,4 +1,4 @@ -reader.rs - source
1
+reader.rs - source
1
 2
 3
 4
@@ -193,7 +193,7 @@
 use crate::Error;
 
 /// A reader that can temporarily buffer bytes read.
-pub trait Reader<'de>: ReadBytesExt {
+pub trait Reader<'de>: ReadBytesExt {
     /// Reads exactly `length` bytes.
     ///
     /// If the reader supports borrowing bytes, [`BufferedBytes::Data`] should
@@ -204,24 +204,24 @@
         &mut self,
         length: usize,
         scratch: &mut Vec<u8>,
-    ) -> Result<BufferedBytes<'de>, Error>;
+    ) -> Result<BufferedBytes<'de>, Error>;
 }
 
 /// Bytes that have been read into a buffer.
 #[derive(Debug)]
-pub enum BufferedBytes<'de> {
+pub enum BufferedBytes<'de> {
     /// The bytes that have been read can be borrowed from the source.
-    Data(&'de [u8]),
+    Data(&'de [u8]),
     /// The bytes that have been read have been stored in the scratch buffer
     /// passed to the function reading bytes.
     Scratch,
 }
 
-impl BufferedBytes<'_> {
+impl BufferedBytes<'_> {
     /// Resolves the bytes to a byte slice.
     #[inline]
     #[must_use]
-    pub fn as_slice<'a>(&'a self, scratch: &'a [u8]) -> &'a [u8] {
+    pub fn as_slice<'a>(&'a self, scratch: &'a [u8]) -> &'a [u8] {
         match self {
             BufferedBytes::Data(data) => data,
             BufferedBytes::Scratch => scratch,
@@ -231,11 +231,11 @@
 
 /// Reads data from a slice.
 #[allow(clippy::module_name_repetitions)]
-pub struct SliceReader<'a> {
-    pub(crate) data: &'a [u8],
+pub struct SliceReader<'a> {
+    pub(crate) data: &'a [u8],
 }
 
-impl<'a> SliceReader<'a> {
+impl<'a> SliceReader<'a> {
     /// Returns the remaining bytes to read.
     #[must_use]
     #[inline]
@@ -251,38 +251,38 @@
     }
 }
 
-impl<'a> Debug for SliceReader<'a> {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        f.debug_struct("SliceReader")
+impl<'a> Debug for SliceReader<'a> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("SliceReader")
             .field(
-                "preview",
-                &format!("{:0x?}", &self.data[..8.min(self.data.len())]),
+                "preview",
+                &format!("{:0x?}", &self.data[..8.min(self.data.len())]),
             )
             .finish()
     }
 }
 
-impl<'a> From<&'a [u8]> for SliceReader<'a> {
+impl<'a> From<&'a [u8]> for SliceReader<'a> {
     #[inline]
-    fn from(data: &'a [u8]) -> Self {
+    fn from(data: &'a [u8]) -> Self {
         Self { data }
     }
 }
 
-impl<'a> From<SliceReader<'a>> for &'a [u8] {
+impl<'a> From<SliceReader<'a>> for &'a [u8] {
     #[inline]
-    fn from(reader: SliceReader<'a>) -> Self {
+    fn from(reader: SliceReader<'a>) -> Self {
         reader.data
     }
 }
 
-impl<'de> Reader<'de> for SliceReader<'de> {
+impl<'de> Reader<'de> for SliceReader<'de> {
     #[inline]
     fn buffered_read_bytes(
         &mut self,
         length: usize,
         _scratch: &mut Vec<u8>,
-    ) -> Result<BufferedBytes<'de>, Error> {
+    ) -> Result<BufferedBytes<'de>, Error> {
         if length > self.data.len() {
             self.data = &self.data[self.data.len()..];
             Err(Error::Eof)
@@ -294,7 +294,7 @@
     }
 }
 
-impl<'a> Read for SliceReader<'a> {
+impl<'a> Read for SliceReader<'a> {
     #[inline]
     fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
         let remaining_length = self.data.len();
@@ -321,13 +321,13 @@
     }
 }
 
-impl<'de, R: ReadBytesExt> Reader<'de> for IoReader<R> {
+impl<'de, R: ReadBytesExt> Reader<'de> for IoReader<R> {
     #[inline]
     fn buffered_read_bytes(
         &mut self,
         length: usize,
         scratch: &mut Vec<u8>,
-    ) -> Result<BufferedBytes<'de>, Error> {
+    ) -> Result<BufferedBytes<'de>, Error> {
         scratch.resize(length, 0);
         self.reader.read_exact(scratch)?;
         Ok(BufferedBytes::Scratch)
@@ -341,7 +341,7 @@
     }
 
     #[inline]
-    fn read_vectored(&mut self, bufs: &mut [std::io::IoSliceMut<'_>]) -> std::io::Result<usize> {
+    fn read_vectored(&mut self, bufs: &mut [std::io::IoSliceMut<'_>]) -> std::io::Result<usize> {
         self.reader.read_vectored(bufs)
     }
 
@@ -363,13 +363,13 @@
 
 #[test]
 fn slice_reader_pub_methods() {
-    let mut reader = SliceReader::from(&b"a"[..]);
+    let mut reader = SliceReader::from(&b"a"[..]);
     assert_eq!(reader.len(), 1);
     assert!(!reader.is_empty());
     reader.read_exact(&mut [0]).unwrap();
 
     assert_eq!(reader.len(), 0);
     assert!(reader.is_empty());
-    assert_eq!(<&[u8]>::from(reader), b"");
+    assert_eq!(<&[u8]>::from(reader), b"");
 }
 
\ No newline at end of file diff --git a/main/src/pot/ser.rs.html b/main/src/pot/ser.rs.html index 50a97732..95997a33 100644 --- a/main/src/pot/ser.rs.html +++ b/main/src/pot/ser.rs.html @@ -1,4 +1,4 @@ -ser.rs - source
1
+ser.rs - source
use std::borrow::Cow;
 use std::cmp::Ordering;
 use std::fmt::{Debug, Display};
@@ -1232,49 +1267,68 @@
 use byteorder::WriteBytesExt;
 use serde::de::{SeqAccess, Visitor};
 use serde::{ser, Deserialize, Serialize};
-#[cfg(feature = "tracing")]
+#[cfg(feature = "tracing")]
 use tracing::instrument;
 
-use crate::format::{self, Kind, Special, CURRENT_VERSION};
-use crate::{Error, Result};
+use crate::format::{self, Kind, Special, INITIAL_VERSION, V4_VERSION};
+use crate::{Compatibility, Error, Result};
 
 /// A Pot serializer.
-pub struct Serializer<'a, W: WriteBytesExt> {
-    symbol_map: SymbolMapRef<'a>,
+pub struct Serializer<'a, W: WriteBytesExt> {
+    symbol_map: SymbolMapRef<'a>,
+    compatibility: Compatibility,
     output: W,
     bytes_written: usize,
 }
 
-impl<'a, W: WriteBytesExt> Debug for Serializer<'a, W> {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        f.debug_struct("Serializer")
-            .field("symbol_map", &self.symbol_map)
-            .field("bytes_written", &self.bytes_written)
+impl<'a, W: WriteBytesExt> Debug for Serializer<'a, W> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("Serializer")
+            .field("symbol_map", &self.symbol_map)
+            .field("bytes_written", &self.bytes_written)
             .finish()
     }
 }
 
-impl<'a, W: WriteBytesExt> Serializer<'a, W> {
+impl<'a, W: WriteBytesExt> Serializer<'a, W> {
     /// Returns a new serializer outputting written bytes into `output`.
     #[inline]
     pub fn new(output: W) -> Result<Self> {
+        Self::new_with_compatibility(output, Compatibility::default())
+    }
+
+    /// Returns a new serializer outputting written bytes into `output`.
+    #[inline]
+    pub fn new_with_compatibility(output: W, compatibility: Compatibility) -> Result<Self> {
         Self::new_with_symbol_map(
             output,
             SymbolMapRef::Ephemeral(EphemeralSymbolMap::default()),
+            compatibility,
         )
     }
 
-    fn new_with_symbol_map(mut output: W, symbol_map: SymbolMapRef<'a>) -> Result<Self> {
-        let bytes_written = format::write_header(&mut output, CURRENT_VERSION)?;
+    fn new_with_symbol_map(
+        mut output: W,
+        symbol_map: SymbolMapRef<'a>,
+        compatibility: Compatibility,
+    ) -> Result<Self> {
+        let bytes_written = format::write_header(
+            &mut output,
+            match compatibility {
+                Compatibility::Full => INITIAL_VERSION,
+                Compatibility::V4 => V4_VERSION,
+            },
+        )?;
         Ok(Self {
+            compatibility,
             symbol_map,
             output,
             bytes_written,
         })
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
-    fn write_symbol(&mut self, symbol: &'static str) -> Result<()> {
+    #[cfg_attr(feature = "tracing", instrument)]
+    fn write_symbol(&mut self, symbol: &'static str) -> Result<()> {
         let registered_symbol = self.symbol_map.find_or_add(symbol);
         if registered_symbol.new {
             // The arg is the length followed by a 0 bit.
@@ -1294,13 +1348,13 @@
     }
 }
 
-impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::Serializer for &'de mut Serializer<'a, W> {
+impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::Serializer for &'de mut Serializer<'a, W> {
     type Error = Error;
     type Ok = ();
-    type SerializeMap = MapSerializer<'de, 'a, W>;
+    type SerializeMap = MapSerializer<'de, 'a, W>;
     type SerializeSeq = Self;
-    type SerializeStruct = MapSerializer<'de, 'a, W>;
-    type SerializeStructVariant = MapSerializer<'de, 'a, W>;
+    type SerializeStruct = MapSerializer<'de, 'a, W>;
+    type SerializeStructVariant = MapSerializer<'de, 'a, W>;
     type SerializeTuple = Self;
     type SerializeTupleStruct = Self;
     type SerializeTupleVariant = Self;
@@ -1310,126 +1364,126 @@
         false
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_bool(self, v: bool) -> Result<()> {
         self.bytes_written += format::write_bool(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_i8(self, v: i8) -> Result<()> {
         self.bytes_written += format::write_i8(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_i16(self, v: i16) -> Result<()> {
         self.bytes_written += format::write_i16(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_i32(self, v: i32) -> Result<()> {
         self.bytes_written += format::write_i32(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_i64(self, v: i64) -> Result<()> {
         self.bytes_written += format::write_i64(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_i128(self, v: i128) -> Result<()> {
         self.bytes_written += format::write_i128(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_u8(self, v: u8) -> Result<()> {
         self.bytes_written += format::write_u8(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_u16(self, v: u16) -> Result<()> {
         self.bytes_written += format::write_u16(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_u32(self, v: u32) -> Result<()> {
         self.bytes_written += format::write_u32(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_u64(self, v: u64) -> Result<()> {
         self.bytes_written += format::write_u64(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_u128(self, v: u128) -> Result<()> {
         self.bytes_written += format::write_u128(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_f32(self, v: f32) -> Result<()> {
         self.bytes_written += format::write_f32(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_f64(self, v: f64) -> Result<()> {
         self.bytes_written += format::write_f64(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_char(self, v: char) -> Result<()> {
         self.bytes_written += format::write_u32(&mut self.output, v as u32)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_str(self, v: &str) -> Result<()> {
         self.bytes_written += format::write_str(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_bytes(self, v: &[u8]) -> Result<()> {
         self.bytes_written += format::write_bytes(&mut self.output, v)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_none(self) -> Result<()> {
         self.bytes_written += format::write_none(&mut self.output)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(value)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(value)))]
     #[inline]
     fn serialize_some<T>(self, value: &T) -> Result<()>
     where
@@ -1438,48 +1492,50 @@
         value.serialize(self)
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_unit(self) -> Result<()> {
         self.bytes_written += format::write_unit(&mut self.output)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
-    fn serialize_unit_struct(self, _name: &'static str) -> Result<()> {
+    fn serialize_unit_struct(self, _name: &'static str) -> Result<()> {
         self.serialize_unit()
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_unit_variant(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
     ) -> Result<()> {
-        format::write_named(&mut self.output)?;
+        if matches!(self.compatibility, Compatibility::Full) {
+            self.bytes_written += format::write_named(&mut self.output)?;
+        }
         self.write_symbol(variant)?;
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(value)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(value)))]
     #[inline]
-    fn serialize_newtype_struct<T>(self, _name: &'static str, value: &T) -> Result<()>
+    fn serialize_newtype_struct<T>(self, _name: &'static str, value: &T) -> Result<()>
     where
         T: ?Sized + Serialize,
     {
         value.serialize(self)
     }
 
-    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(value)))]
+    #[cfg_attr(feature = "tracing", instrument(level = "trace", skip(value)))]
     #[inline]
     fn serialize_newtype_variant<T>(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
         value: &T,
     ) -> Result<()>
     where
@@ -1491,7 +1547,7 @@
         Ok(())
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq> {
         let len = len.ok_or(Error::SequenceSizeMustBeKnown)?;
@@ -1500,29 +1556,29 @@
         Ok(self)
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple> {
         self.serialize_seq(Some(len))
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_tuple_struct(
         self,
-        _name: &'static str,
+        _name: &'static str,
         len: usize,
     ) -> Result<Self::SerializeTupleStruct> {
         self.serialize_seq(Some(len))
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_tuple_variant(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
         len: usize,
     ) -> Result<Self::SerializeTupleVariant> {
         format::write_named(&mut self.output)?;
@@ -1530,7 +1586,7 @@
         self.serialize_seq(Some(len))
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap> {
         if let Some(len) = len {
@@ -1549,19 +1605,19 @@
         }
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
-    fn serialize_struct(self, _name: &'static str, len: usize) -> Result<Self::SerializeStruct> {
+    fn serialize_struct(self, _name: &'static str, len: usize) -> Result<Self::SerializeStruct> {
         self.serialize_map(Some(len))
     }
 
-    #[cfg_attr(feature = "tracing", instrument)]
+    #[cfg_attr(feature = "tracing", instrument)]
     #[inline]
     fn serialize_struct_variant(
         self,
-        name: &'static str,
+        name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
         len: usize,
     ) -> Result<Self::SerializeStructVariant> {
         format::write_named(&mut self.output)?;
@@ -1570,7 +1626,7 @@
     }
 }
 
-impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeSeq for &'de mut Serializer<'a, W> {
+impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeSeq for &'de mut Serializer<'a, W> {
     type Error = Error;
     type Ok = ();
 
@@ -1588,7 +1644,7 @@
     }
 }
 
-impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeTuple for &'de mut Serializer<'a, W> {
+impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeTuple for &'de mut Serializer<'a, W> {
     type Error = Error;
     type Ok = ();
 
@@ -1606,7 +1662,7 @@
     }
 }
 
-impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeTupleStruct for &'de mut Serializer<'a, W> {
+impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeTupleStruct for &'de mut Serializer<'a, W> {
     type Error = Error;
     type Ok = ();
 
@@ -1624,8 +1680,8 @@
     }
 }
 
-impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeTupleVariant
-    for &'de mut Serializer<'a, W>
+impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeTupleVariant
+    for &'de mut Serializer<'a, W>
 {
     type Error = Error;
     type Ok = ();
@@ -1645,12 +1701,12 @@
 }
 
 /// Serializes map-like values.
-pub struct MapSerializer<'de, 'a, W: WriteBytesExt> {
-    serializer: &'de mut Serializer<'a, W>,
+pub struct MapSerializer<'de, 'a, W: WriteBytesExt> {
+    serializer: &'de mut Serializer<'a, W>,
     known_length: bool,
 }
 
-impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeMap for MapSerializer<'de, 'a, W> {
+impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeMap for MapSerializer<'de, 'a, W> {
     type Error = Error;
     type Ok = ();
 
@@ -1679,12 +1735,12 @@
     }
 }
 
-impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeStruct for MapSerializer<'de, 'a, W> {
+impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeStruct for MapSerializer<'de, 'a, W> {
     type Error = Error;
     type Ok = ();
 
     #[inline]
-    fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
+    fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
     where
         T: ?Sized + Serialize,
     {
@@ -1701,14 +1757,14 @@
     }
 }
 
-impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeStructVariant
-    for MapSerializer<'de, 'a, W>
+impl<'de, 'a: 'de, W: WriteBytesExt + 'a> ser::SerializeStructVariant
+    for MapSerializer<'de, 'a, W>
 {
     type Error = Error;
     type Ok = ();
 
     #[inline]
-    fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
+    fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
     where
         T: ?Sized + Serialize,
     {
@@ -1727,7 +1783,7 @@
 
 #[derive(Default)]
 struct EphemeralSymbolMap {
-    symbols: Vec<(&'static str, u32)>,
+    symbols: Vec<(&'static str, u32)>,
 }
 
 struct RegisteredSymbol {
@@ -1737,9 +1793,9 @@
 
 impl EphemeralSymbolMap {
     #[allow(clippy::cast_possible_truncation)]
-    fn find_or_add(&mut self, symbol: &'static str) -> RegisteredSymbol {
+    fn find_or_add(&mut self, symbol: &'static str) -> RegisteredSymbol {
         // Symbols have to be static strings, and so we can rely on the addres
-        // not changing. To avoid string comparisons, we're going to use the
+        // not changing. To avoid string comparisons, we're going to use the
         // address of the str in the map.
         let symbol_address = symbol.as_ptr() as usize;
         // Perform a binary search to find this existing element.
@@ -1761,7 +1817,7 @@
 }
 
 impl Debug for EphemeralSymbolMap {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         let mut set = f.debug_set();
         for index in SymbolIdSorter::new(&self.symbols, |sym| sym.1) {
             set.entry(&self.symbols[index].0);
@@ -1775,10 +1831,11 @@
     symbols: String,
     entries: Vec<(Range<usize>, u32)>,
     static_lookup: Vec<(usize, u32)>,
+    compatibility: Compatibility,
 }
 
 impl Debug for SymbolMap {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         let mut s = f.debug_set();
         for entry in &self.entries {
             s.entry(&&self.symbols[entry.0.clone()]);
@@ -1802,14 +1859,27 @@
             symbols: String::new(),
             entries: Vec::new(),
             static_lookup: Vec::new(),
+            compatibility: Compatibility::const_default(),
         }
     }
 
+    /// Sets the compatibility mode for serializing and returns self.
+    pub const fn with_compatibility(mut self, compatibility: Compatibility) -> Self {
+        self.compatibility = compatibility;
+        self
+    }
+
+    /// Sets the compatibility mode for serializing.
+    pub fn set_compatibility(&mut self, compatibility: Compatibility) {
+        self.compatibility = compatibility;
+    }
+
     /// Returns a serializer that writes into `output` and persists symbols
     /// into `self`.
     #[inline]
-    pub fn serializer_for<W: WriteBytesExt>(&mut self, output: W) -> Result<Serializer<'_, W>> {
-        Serializer::new_with_symbol_map(output, SymbolMapRef::Persistent(self))
+    pub fn serializer_for<W: WriteBytesExt>(&mut self, output: W) -> Result<Serializer<'_, W>> {
+        let compatibility = self.compatibility;
+        Serializer::new_with_symbol_map(output, SymbolMapRef::Persistent(self), compatibility)
     }
 
     /// Serializes `value` into `writer` while persisting symbols into `self`.
@@ -1832,9 +1902,9 @@
         Ok(output)
     }
 
-    fn find_or_add(&mut self, symbol: &'static str) -> RegisteredSymbol {
+    fn find_or_add(&mut self, symbol: &'static str) -> RegisteredSymbol {
         // Symbols have to be static strings, and so we can rely on the addres
-        // not changing. To avoid string comparisons, we're going to use the
+        // not changing. To avoid string comparisons, we're going to use the
         // address of the str in the map.
         let symbol_address = symbol.as_ptr() as usize;
         // Perform a binary search to find this existing element.
@@ -1847,7 +1917,7 @@
                 new: false,
             },
             Err(position) => {
-                // This static symbol hasn't been encountered before.
+                // This static symbol hasn't been encountered before.
                 let symbol = self.find_entry_by_str(symbol);
                 self.static_lookup
                     .insert(position, (symbol_address, symbol.id));
@@ -1930,11 +2000,11 @@
     }
 }
 
-impl<'de> Deserialize<'de> for SymbolMap {
+impl<'de> Deserialize<'de> for SymbolMap {
     #[inline]
     fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
     where
-        D: serde::Deserializer<'de>,
+        D: serde::Deserializer<'de>,
     {
         deserializer.deserialize_seq(SymbolMapVisitor)
     }
@@ -1942,24 +2012,24 @@
 
 struct SymbolMapVisitor;
 
-impl<'de> Visitor<'de> for SymbolMapVisitor {
+impl<'de> Visitor<'de> for SymbolMapVisitor {
     type Value = SymbolMap;
 
-    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        formatter.write_str("symbol map")
+    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        formatter.write_str("symbol map")
     }
 
     #[inline]
     fn visit_seq<A>(self, mut seq: A) -> std::result::Result<Self::Value, A::Error>
     where
-        A: SeqAccess<'de>,
+        A: SeqAccess<'de>,
     {
         let mut map = SymbolMap::new();
         if let Some(hint) = seq.size_hint() {
             map.entries.reserve(hint);
         }
         let mut id = 0;
-        while let Some(element) = seq.next_element::<Cow<'_, str>>()? {
+        while let Some(element) = seq.next_element::<Cow<'_, str>>()? {
             let start = map.symbols.len();
             map.symbols.push_str(&element);
             map.entries.push((start..map.symbols.len(), id));
@@ -1974,13 +2044,13 @@
 }
 
 #[derive(Debug)]
-enum SymbolMapRef<'a> {
+enum SymbolMapRef<'a> {
     Ephemeral(EphemeralSymbolMap),
-    Persistent(&'a mut SymbolMap),
+    Persistent(&'a mut SymbolMap),
 }
 
-impl SymbolMapRef<'_> {
-    fn find_or_add(&mut self, symbol: &'static str) -> RegisteredSymbol {
+impl SymbolMapRef<'_> {
+    fn find_or_add(&mut self, symbol: &'static str) -> RegisteredSymbol {
         match self {
             SymbolMapRef::Ephemeral(map) => map.find_or_add(symbol),
             SymbolMapRef::Persistent(map) => map.find_or_add(symbol),
@@ -1988,9 +2058,9 @@
     }
 }
 
-struct SymbolMapPopulator<'a>(&'a mut SymbolMap);
+struct SymbolMapPopulator<'a>(&'a mut SymbolMap);
 
-impl<'ser, 'a> serde::ser::Serializer for &'ser mut SymbolMapPopulator<'a> {
+impl<'ser, 'a> serde::ser::Serializer for &'ser mut SymbolMapPopulator<'a> {
     type Error = SymbolMapPopulationError;
     type Ok = ();
     type SerializeMap = Self;
@@ -2102,7 +2172,7 @@
     #[inline]
     fn serialize_unit_struct(
         self,
-        _name: &'static str,
+        _name: &'static str,
     ) -> std::result::Result<Self::Ok, Self::Error> {
         Ok(())
     }
@@ -2110,9 +2180,9 @@
     #[inline]
     fn serialize_unit_variant(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
     ) -> std::result::Result<Self::Ok, Self::Error> {
         self.0.find_or_add(variant);
         Ok(())
@@ -2121,7 +2191,7 @@
     #[inline]
     fn serialize_newtype_struct<T: ?Sized>(
         self,
-        _name: &'static str,
+        _name: &'static str,
         value: &T,
     ) -> std::result::Result<Self::Ok, Self::Error>
     where
@@ -2133,9 +2203,9 @@
     #[inline]
     fn serialize_newtype_variant<T: ?Sized>(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
         value: &T,
     ) -> std::result::Result<Self::Ok, Self::Error>
     where
@@ -2164,7 +2234,7 @@
     #[inline]
     fn serialize_tuple_struct(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _len: usize,
     ) -> std::result::Result<Self::SerializeTupleStruct, Self::Error> {
         Ok(self)
@@ -2173,9 +2243,9 @@
     #[inline]
     fn serialize_tuple_variant(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
         _len: usize,
     ) -> std::result::Result<Self::SerializeTupleVariant, Self::Error> {
         self.0.find_or_add(variant);
@@ -2193,7 +2263,7 @@
     #[inline]
     fn serialize_struct(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _len: usize,
     ) -> std::result::Result<Self::SerializeStruct, Self::Error> {
         Ok(self)
@@ -2202,9 +2272,9 @@
     #[inline]
     fn serialize_struct_variant(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
         _len: usize,
     ) -> std::result::Result<Self::SerializeStructVariant, Self::Error> {
         self.0.find_or_add(variant);
@@ -2212,7 +2282,7 @@
     }
 }
 
-impl serde::ser::SerializeMap for &mut SymbolMapPopulator<'_> {
+impl serde::ser::SerializeMap for &mut SymbolMapPopulator<'_> {
     type Error = SymbolMapPopulationError;
     type Ok = ();
 
@@ -2238,7 +2308,7 @@
     }
 }
 
-impl serde::ser::SerializeSeq for &mut SymbolMapPopulator<'_> {
+impl serde::ser::SerializeSeq for &mut SymbolMapPopulator<'_> {
     type Error = SymbolMapPopulationError;
     type Ok = ();
 
@@ -2256,14 +2326,14 @@
     }
 }
 
-impl serde::ser::SerializeStruct for &mut SymbolMapPopulator<'_> {
+impl serde::ser::SerializeStruct for &mut SymbolMapPopulator<'_> {
     type Error = SymbolMapPopulationError;
     type Ok = ();
 
     #[inline]
     fn serialize_field<T: ?Sized>(
         &mut self,
-        key: &'static str,
+        key: &'static str,
         value: &T,
     ) -> std::result::Result<(), Self::Error>
     where
@@ -2279,14 +2349,14 @@
     }
 }
 
-impl serde::ser::SerializeStructVariant for &mut SymbolMapPopulator<'_> {
+impl serde::ser::SerializeStructVariant for &mut SymbolMapPopulator<'_> {
     type Error = SymbolMapPopulationError;
     type Ok = ();
 
     #[inline]
     fn serialize_field<T: ?Sized>(
         &mut self,
-        key: &'static str,
+        key: &'static str,
         value: &T,
     ) -> std::result::Result<(), Self::Error>
     where
@@ -2302,7 +2372,7 @@
     }
 }
 
-impl serde::ser::SerializeTuple for &mut SymbolMapPopulator<'_> {
+impl serde::ser::SerializeTuple for &mut SymbolMapPopulator<'_> {
     type Error = SymbolMapPopulationError;
     type Ok = ();
 
@@ -2319,7 +2389,7 @@
         Ok(())
     }
 }
-impl serde::ser::SerializeTupleStruct for &mut SymbolMapPopulator<'_> {
+impl serde::ser::SerializeTupleStruct for &mut SymbolMapPopulator<'_> {
     type Error = SymbolMapPopulationError;
     type Ok = ();
 
@@ -2336,7 +2406,7 @@
         Ok(())
     }
 }
-impl serde::ser::SerializeTupleVariant for &mut SymbolMapPopulator<'_> {
+impl serde::ser::SerializeTupleVariant for &mut SymbolMapPopulator<'_> {
     type Error = SymbolMapPopulationError;
     type Ok = ();
 
@@ -2359,7 +2429,7 @@
 pub struct SymbolMapPopulationError(String);
 
 impl Display for SymbolMapPopulationError {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         f.write_str(&self.0)
     }
 }
@@ -2375,18 +2445,18 @@
     }
 }
 
-struct SymbolIdSorter<'a, T, F> {
-    source: &'a [T],
+struct SymbolIdSorter<'a, T, F> {
+    source: &'a [T],
     map: F,
     min: usize,
     id: u32,
 }
 
-impl<'a, T, F> SymbolIdSorter<'a, T, F>
+impl<'a, T, F> SymbolIdSorter<'a, T, F>
 where
     F: FnMut(&T) -> u32,
 {
-    pub fn new(source: &'a [T], map: F) -> Self {
+    pub fn new(source: &'a [T], map: F) -> Self {
         Self {
             source,
             map,
@@ -2395,7 +2465,7 @@
         }
     }
 }
-impl<'a, T, F> Iterator for SymbolIdSorter<'a, T, F>
+impl<'a, T, F> Iterator for SymbolIdSorter<'a, T, F>
 where
     F: FnMut(&T) -> u32,
     T: Clone,
@@ -2429,8 +2499,8 @@
 #[test]
 fn symbol_map_debug() {
     let mut map = EphemeralSymbolMap::default();
-    // To force the order, we're splitting a single string into multiple parts.
-    let full_source = "abcd";
+    // To force the order, we're splitting a single string into multiple parts.
+    let full_source = "abcd";
 
     map.find_or_add(&full_source[1..2]);
     map.find_or_add(&full_source[0..1]);
@@ -2438,12 +2508,12 @@
     map.find_or_add(&full_source[3..4]);
 
     // Verify the map sorted the symbols correctly (by memory address).
-    assert_eq!(map.symbols[0].0, "a");
-    assert_eq!(map.symbols[1].0, "b");
-    assert_eq!(map.symbols[2].0, "c");
-    assert_eq!(map.symbols[3].0, "d");
+    assert_eq!(map.symbols[0].0, "a");
+    assert_eq!(map.symbols[1].0, "b");
+    assert_eq!(map.symbols[2].0, "c");
+    assert_eq!(map.symbols[3].0, "d");
 
     // Verify the debug output printed the correct order.
-    assert_eq!(format!("{map:?}"), r#"{"b", "a", "c", "d"}"#);
+    assert_eq!(format!("{map:?}"), r#"{"b", "a", "c", "d"}"#);
 }
 
\ No newline at end of file diff --git a/main/src/pot/value.rs.html b/main/src/pot/value.rs.html index 639bd26b..f95b38a9 100644 --- a/main/src/pot/value.rs.html +++ b/main/src/pot/value.rs.html @@ -1,4 +1,4 @@ -value.rs - source
1
+value.rs - source
1
 2
 3
 4
@@ -2299,7 +2299,7 @@
 /// A Pot-encoded value. This type can be used to deserialize to and from Pot
 /// without knowing the original data structure.
 #[derive(Debug, Clone)]
-pub enum Value<'a> {
+pub enum Value<'a> {
     /// A value representing `None`.
     None,
     /// A value representing unit (`()`).
@@ -2311,16 +2311,16 @@
     /// A floating point value.
     Float(Float),
     /// A value containing arbitrary bytes.
-    Bytes(Cow<'a, [u8]>),
+    Bytes(Cow<'a, [u8]>),
     /// A string value.
-    String(Cow<'a, str>),
+    String(Cow<'a, str>),
     /// A sequence of values.
     Sequence(Vec<Self>),
     /// A sequence of key-value mappings.
     Mappings(Vec<(Self, Self)>),
 }
 
-impl<'a> Value<'a> {
+impl<'a> Value<'a> {
     /// Creates a `Value` from the given Serde-compatible type.
     ///
     /// ```rust
@@ -2339,8 +2339,8 @@
     /// assert_eq!(
     ///     serialized,
     ///     Value::Sequence(vec![
-    ///         Value::from(String::from("Hello")),
-    ///         Value::from(String::from("World"))
+    ///         Value::from(String::from("Hello")),
+    ///         Value::from(String::from("World"))
     ///     ])
     /// );
     /// # Ok(())
@@ -2372,7 +2372,7 @@
     /// # }
     /// ```
     #[inline]
-    pub fn deserialize_as<'de, T: Deserialize<'de>>(&'de self) -> Result<T, ValueError> {
+    pub fn deserialize_as<'de, T: Deserialize<'de>>(&'de self) -> Result<T, ValueError> {
         T::deserialize(Deserializer(self))
     }
 
@@ -2420,11 +2420,11 @@
     ///
     /// // For all other types, having a length of 0 will result in is_empty returning true.
     /// assert_eq!(Value::from(Vec::<u8>::new()).is_empty(), true);
-    /// assert_eq!(Value::from(b"").is_empty(), true);
+    /// assert_eq!(Value::from(b"").is_empty(), true);
     /// assert_eq!(Value::from(vec![0_u8]).is_empty(), false);
     ///
-    /// assert_eq!(Value::from("").is_empty(), true);
-    /// assert_eq!(Value::from("hi").is_empty(), false);
+    /// assert_eq!(Value::from("").is_empty(), true);
+    /// assert_eq!(Value::from("hi").is_empty(), false);
     ///
     /// assert_eq!(Value::Sequence(Vec::new()).is_empty(), true);
     /// assert_eq!(Value::from(vec![Value::None]).is_empty(), false);
@@ -2470,11 +2470,11 @@
     ///
     /// // For all other types, as_bool() returns the result of `!is_empty()`.
     /// assert_eq!(Value::from(Vec::<u8>::new()).as_bool(), false);
-    /// assert_eq!(Value::from(b"").as_bool(), false);
+    /// assert_eq!(Value::from(b"").as_bool(), false);
     /// assert_eq!(Value::from(vec![0_u8]).as_bool(), true);
     ///
-    /// assert_eq!(Value::from("").as_bool(), false);
-    /// assert_eq!(Value::from("hi").as_bool(), true);
+    /// assert_eq!(Value::from("").as_bool(), false);
+    /// assert_eq!(Value::from("hi").as_bool(), true);
     ///
     /// assert_eq!(Value::Sequence(Vec::new()).as_bool(), false);
     /// assert_eq!(Value::from(vec![Value::None]).as_bool(), true);
@@ -2560,7 +2560,7 @@
     /// the mapping is returned.
     #[must_use]
     #[inline]
-    pub fn values(&self) -> ValueIter<'_> {
+    pub fn values(&self) -> ValueIter<'_> {
         match self {
             Self::Sequence(sequence) => ValueIter(SequenceIterState::Sequence(sequence.iter())),
             Self::Mappings(mappings) => ValueIter(SequenceIterState::Mappings(mappings.iter())),
@@ -2573,15 +2573,15 @@
     /// [`Self::Mappings`]. If a [`Self::Sequence`], the key will always be
     /// `Self::None`.
     #[inline]
-    pub fn mappings(&self) -> std::slice::Iter<'_, (Self, Self)> {
+    pub fn mappings(&self) -> std::slice::Iter<'_, (Self, Self)> {
         match self {
             Self::Mappings(mappings) => mappings.iter(),
             _ => [].iter(),
         }
     }
 
-    /// Converts `self` to a `'static` lifetime by cloning any borrowed data.
-    pub fn into_static(self) -> Value<'static> {
+    /// Converts `self` to a `'static` lifetime by cloning any borrowed data.
+    pub fn into_static(self) -> Value<'static> {
         match self {
             Self::None => Value::None,
             Self::Unit => Value::Unit,
@@ -2604,8 +2604,8 @@
         }
     }
 
-    /// Converts `self` to a `'static` lifetime by cloning all data.
-    pub fn to_static(&self) -> Value<'static> {
+    /// Converts `self` to a `'static` lifetime by cloning all data.
+    pub fn to_static(&self) -> Value<'static> {
         match self {
             Self::None => Value::None,
             Self::Unit => Value::Unit,
@@ -2627,9 +2627,9 @@
     }
 }
 
-impl<'a, 'b> PartialEq<Value<'b>> for Value<'a> {
+impl<'a, 'b> PartialEq<Value<'b>> for Value<'a> {
     #[inline]
-    fn eq(&self, other: &Value<'b>) -> bool {
+    fn eq(&self, other: &Value<'b>) -> bool {
         match (self, other) {
             (Self::Bool(l0), Value::Bool(r0)) => l0 == r0,
             (Self::Integer(l0), Value::Integer(r0)) => l0 == r0,
@@ -2645,53 +2645,53 @@
     }
 }
 
-impl<'a> Display for Value<'a> {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+impl<'a> Display for Value<'a> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         match self {
-            Value::None => f.write_str("None"),
-            Value::Unit => f.write_str("()"),
-            Value::Bool(true) => f.write_str("true"),
-            Value::Bool(false) => f.write_str("false"),
+            Value::None => f.write_str("None"),
+            Value::Unit => f.write_str("()"),
+            Value::Bool(true) => f.write_str("true"),
+            Value::Bool(false) => f.write_str("false"),
             Value::Integer(value) => Display::fmt(value, f),
             Value::Float(value) => Display::fmt(value, f),
             Value::Bytes(bytes) => {
-                f.write_str("0x")?;
+                f.write_str("0x")?;
                 for (index, byte) in bytes.iter().enumerate() {
                     if index > 0 && index % 4 == 0 {
-                        f.write_char('_')?;
+                        f.write_char('_')?;
                     }
-                    write!(f, "{byte:02x}")?;
+                    write!(f, "{byte:02x}")?;
                 }
                 Ok(())
             }
             Value::String(string) => f.write_str(string),
             Value::Sequence(sequence) => {
-                f.write_char('[')?;
+                f.write_char('[')?;
                 for (index, value) in sequence.iter().enumerate() {
                     if index > 0 {
-                        f.write_str(", ")?;
+                        f.write_str(", ")?;
                     }
                     Display::fmt(value, f)?;
                 }
-                f.write_char(']')
+                f.write_char(']')
             }
             Value::Mappings(mappings) => {
-                f.write_char('{')?;
+                f.write_char('{')?;
                 for (index, (key, value)) in mappings.iter().enumerate() {
                     if index > 0 {
-                        f.write_str(", ")?;
+                        f.write_str(", ")?;
                     }
                     Display::fmt(key, f)?;
-                    f.write_str(": ")?;
+                    f.write_str(": ")?;
                     Display::fmt(value, f)?;
                 }
-                f.write_char('}')
+                f.write_char('}')
             }
         }
     }
 }
 
-impl<'a> Serialize for Value<'a> {
+impl<'a> Serialize for Value<'a> {
     #[inline]
     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
     where
@@ -2737,11 +2737,11 @@
     }
 }
 
-impl<'de: 'a, 'a> Deserialize<'de> for Value<'a> {
+impl<'de: 'a, 'a> Deserialize<'de> for Value<'a> {
     #[inline]
     fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
     where
-        D: serde::Deserializer<'de>,
+        D: serde::Deserializer<'de>,
     {
         deserializer.deserialize_any(ValueVisitor::default())
     }
@@ -2750,16 +2750,16 @@
 /// A <code>[Value]&lt;&apos;static&gt;</code> wrapper that supports
 /// [`DeserializeOwned`](serde::de::DeserializeOwned).
 ///
-/// Because `Value<'a>` can borrow strings and bytes during deserialization,
-/// `Value<'static>` can't be used when `DeserializeOwned` is needed.
+/// 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
-/// `Value<'a>` and then using [`Value::into_static`] to convert borrowed data
+/// `Value<'a>` and then using [`Value::into_static`] to convert borrowed data
 /// to owned data.
 #[derive(Debug, Clone, PartialEq)]
-pub struct OwnedValue(pub Value<'static>);
+pub struct OwnedValue(pub Value<'static>);
 
 impl Deref for OwnedValue {
-    type Target = Value<'static>;
+    type Target = Value<'static>;
 
     #[inline]
     fn deref(&self) -> &Self::Target {
@@ -2784,11 +2784,11 @@
     }
 }
 
-impl<'de> Deserialize<'de> for OwnedValue {
+impl<'de> Deserialize<'de> for OwnedValue {
     #[inline]
     fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
     where
-        D: serde::Deserializer<'de>,
+        D: serde::Deserializer<'de>,
     {
         deserializer
             .deserialize_any(ValueVisitor::default())
@@ -2796,28 +2796,28 @@
     }
 }
 
-impl<'a> From<Value<'a>> for OwnedValue {
+impl<'a> From<Value<'a>> for OwnedValue {
     #[inline]
-    fn from(value: Value<'a>) -> Self {
+    fn from(value: Value<'a>) -> Self {
         Self(value.into_static())
     }
 }
 
-impl<'a> From<&'a Value<'a>> for OwnedValue {
+impl<'a> From<&'a Value<'a>> for OwnedValue {
     #[inline]
-    fn from(value: &'a Value<'a>) -> Self {
+    fn from(value: &'a Value<'a>) -> Self {
         Self(value.to_static())
     }
 }
 
 #[derive(Default)]
-struct ValueVisitor<'a>(PhantomData<&'a ()>);
+struct ValueVisitor<'a>(PhantomData<&'a ()>);
 
-impl<'de: 'a, 'a> Visitor<'de> for ValueVisitor<'a> {
-    type Value = Value<'a>;
+impl<'de: 'a, 'a> Visitor<'de> for ValueVisitor<'a> {
+    type Value = Value<'a>;
 
-    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        formatter.write_str("any value")
+    fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        formatter.write_str("any value")
     }
 
     #[inline]
@@ -2941,7 +2941,7 @@
     }
 
     #[inline]
-    fn visit_borrowed_str<E>(self, v: &'a str) -> Result<Self::Value, E>
+    fn visit_borrowed_str<E>(self, v: &'a str) -> Result<Self::Value, E>
     where
         E: serde::de::Error,
     {
@@ -2965,7 +2965,7 @@
     }
 
     #[inline]
-    fn visit_borrowed_bytes<E>(self, v: &'a [u8]) -> Result<Self::Value, E>
+    fn visit_borrowed_bytes<E>(self, v: &'a [u8]) -> Result<Self::Value, E>
     where
         E: serde::de::Error,
     {
@@ -2983,7 +2983,7 @@
     #[inline]
     fn visit_some<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
     where
-        D: serde::Deserializer<'de>,
+        D: serde::Deserializer<'de>,
     {
         deserializer.deserialize_any(Self::default())
     }
@@ -2999,7 +2999,7 @@
     #[inline]
     fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error>
     where
-        A: serde::de::SeqAccess<'de>,
+        A: serde::de::SeqAccess<'de>,
     {
         let mut values = if let Some(hint) = seq.size_hint() {
             Vec::with_capacity(hint)
@@ -3015,7 +3015,7 @@
     #[inline]
     fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
     where
-        A: serde::de::MapAccess<'de>,
+        A: serde::de::MapAccess<'de>,
     {
         let mut values = if let Some(hint) = map.size_hint() {
             Vec::with_capacity(hint)
@@ -3029,9 +3029,9 @@
     }
 }
 
-impl<'a> From<Option<Value<'a>>> for Value<'a> {
+impl<'a> From<Option<Value<'a>>> for Value<'a> {
     #[inline]
-    fn from(value: Option<Value<'a>>) -> Self {
+    fn from(value: Option<Value<'a>>) -> Self {
         if let Some(value) = value {
             value
         } else {
@@ -3040,23 +3040,23 @@
     }
 }
 
-impl<'a> From<()> for Value<'a> {
+impl<'a> From<()> for Value<'a> {
     #[inline]
     fn from(_: ()) -> Self {
         Value::Unit
     }
 }
 
-impl<'a> From<bool> for Value<'a> {
+impl<'a> From<bool> for Value<'a> {
     #[inline]
     fn from(value: bool) -> Self {
         Value::Bool(value)
     }
 }
 
-macro_rules! define_value_from_primitive {
+macro_rules! define_value_from_primitive {
     ($container:ident, $variant:ident, $primitive:ty) => {
-        impl<'a> From<$primitive> for Value<'a> {
+        impl<'a> From<$primitive> for Value<'a> {
             #[inline]
             fn from(value: $primitive) -> Self {
                 Self::$container($container::from(value))
@@ -3080,58 +3080,58 @@
 define_value_from_primitive!(Float, F32, f32);
 define_value_from_primitive!(Float, F64, f64);
 
-impl<'a> From<&'a [u8]> for Value<'a> {
+impl<'a> From<&'a [u8]> for Value<'a> {
     #[inline]
-    fn from(bytes: &'a [u8]) -> Self {
+    fn from(bytes: &'a [u8]) -> Self {
         Self::Bytes(Cow::Borrowed(bytes))
     }
 }
 
-impl<'a> From<Vec<u8>> for Value<'a> {
+impl<'a> From<Vec<u8>> for Value<'a> {
     #[inline]
     fn from(bytes: Vec<u8>) -> Self {
         Self::Bytes(Cow::Owned(bytes))
     }
 }
 
-impl<'a, const N: usize> From<&'a [u8; N]> for Value<'a> {
+impl<'a, const N: usize> From<&'a [u8; N]> for Value<'a> {
     #[inline]
-    fn from(bytes: &'a [u8; N]) -> Self {
+    fn from(bytes: &'a [u8; N]) -> Self {
         Self::Bytes(Cow::Borrowed(bytes))
     }
 }
 
-impl<'a> From<&'a str> for Value<'a> {
+impl<'a> From<&'a str> for Value<'a> {
     #[inline]
-    fn from(string: &'a str) -> Self {
+    fn from(string: &'a str) -> Self {
         Self::String(Cow::Borrowed(string))
     }
 }
 
-impl<'a> From<String> for Value<'a> {
+impl<'a> From<String> for Value<'a> {
     #[inline]
     fn from(string: String) -> Self {
         Self::String(Cow::Owned(string))
     }
 }
 
-impl<'a> From<Vec<Value<'a>>> for Value<'a> {
+impl<'a> From<Vec<Value<'a>>> for Value<'a> {
     #[inline]
-    fn from(value: Vec<Value<'a>>) -> Self {
+    fn from(value: Vec<Value<'a>>) -> Self {
         Self::Sequence(value)
     }
 }
 
-impl<'a> From<Vec<(Value<'a>, Value<'a>)>> for Value<'a> {
+impl<'a> From<Vec<(Value<'a>, Value<'a>)>> for Value<'a> {
     #[inline]
-    fn from(value: Vec<(Value<'a>, Value<'a>)>) -> Self {
+    fn from(value: Vec<(Value<'a>, Value<'a>)>) -> Self {
         Self::Mappings(value)
     }
 }
 
-impl<'a, A> FromIterator<A> for Value<'a>
+impl<'a, A> FromIterator<A> for Value<'a>
 where
-    A: Into<Value<'a>>,
+    A: Into<Value<'a>>,
 {
     #[inline]
     fn from_iter<T: IntoIterator<Item = A>>(iter: T) -> Self {
@@ -3139,10 +3139,10 @@
     }
 }
 
-impl<'a, K, V> FromIterator<(K, V)> for Value<'a>
+impl<'a, K, V> FromIterator<(K, V)> for Value<'a>
 where
-    K: Into<Value<'a>>,
-    V: Into<Value<'a>>,
+    K: Into<Value<'a>>,
+    V: Into<Value<'a>>,
 {
     #[inline]
     fn from_iter<T: IntoIterator<Item = (K, V)>>(iter: T) -> Self {
@@ -3155,15 +3155,15 @@
 }
 
 /// An iterator over values contained within a [`Value`].
-pub struct ValueIter<'a>(SequenceIterState<'a>);
+pub struct ValueIter<'a>(SequenceIterState<'a>);
 
-enum SequenceIterState<'a> {
-    Sequence(std::slice::Iter<'a, Value<'a>>),
-    Mappings(std::slice::Iter<'a, (Value<'a>, Value<'a>)>),
+enum SequenceIterState<'a> {
+    Sequence(std::slice::Iter<'a, Value<'a>>),
+    Mappings(std::slice::Iter<'a, (Value<'a>, Value<'a>)>),
 }
 
-impl<'a> Iterator for ValueIter<'a> {
-    type Item = &'a Value<'a>;
+impl<'a> Iterator for ValueIter<'a> {
+    type Item = &'a Value<'a>;
 
     #[inline]
     fn next(&mut self) -> Option<Self::Item> {
@@ -3174,7 +3174,7 @@
     }
 }
 
-impl<'a> ExactSizeIterator for ValueIter<'a> {
+impl<'a> ExactSizeIterator for ValueIter<'a> {
     fn len(&self) -> usize {
         match &self.0 {
             SequenceIterState::Sequence(iter) => iter.len(),
@@ -3183,7 +3183,7 @@
     }
 }
 
-impl<'a> DoubleEndedIterator for ValueIter<'a> {
+impl<'a> DoubleEndedIterator for ValueIter<'a> {
     fn next_back(&mut self) -> Option<Self::Item> {
         match &mut self.0 {
             SequenceIterState::Sequence(iter) => iter.next_back(),
@@ -3196,61 +3196,61 @@
 #[allow(clippy::cognitive_complexity)]
 fn value_display_tests() {
     // Specials
-    assert_eq!(Value::None.to_string(), "None");
-    assert_eq!(Value::Unit.to_string(), "()");
+    assert_eq!(Value::None.to_string(), "None");
+    assert_eq!(Value::Unit.to_string(), "()");
 
     // Boolean
-    assert_eq!(Value::Bool(false).to_string(), "false");
-    assert_eq!(Value::Bool(true).to_string(), "true");
+    assert_eq!(Value::Bool(false).to_string(), "false");
+    assert_eq!(Value::Bool(true).to_string(), "true");
 
     // Integer
-    assert_eq!(Value::from(1_u8).to_string(), "1");
-    assert_eq!(Value::from(1_u16).to_string(), "1");
-    assert_eq!(Value::from(1_u32).to_string(), "1");
-    assert_eq!(Value::from(1_u64).to_string(), "1");
-    assert_eq!(Value::from(1_u128).to_string(), "1");
-    assert_eq!(Value::from(1_i8).to_string(), "1");
-    assert_eq!(Value::from(1_i16).to_string(), "1");
-    assert_eq!(Value::from(1_i32).to_string(), "1");
-    assert_eq!(Value::from(1_i64).to_string(), "1");
-    assert_eq!(Value::from(1_i128).to_string(), "1");
+    assert_eq!(Value::from(1_u8).to_string(), "1");
+    assert_eq!(Value::from(1_u16).to_string(), "1");
+    assert_eq!(Value::from(1_u32).to_string(), "1");
+    assert_eq!(Value::from(1_u64).to_string(), "1");
+    assert_eq!(Value::from(1_u128).to_string(), "1");
+    assert_eq!(Value::from(1_i8).to_string(), "1");
+    assert_eq!(Value::from(1_i16).to_string(), "1");
+    assert_eq!(Value::from(1_i32).to_string(), "1");
+    assert_eq!(Value::from(1_i64).to_string(), "1");
+    assert_eq!(Value::from(1_i128).to_string(), "1");
 
     // Float
-    assert_eq!(Value::from(1.1_f32).to_string(), "1.1");
-    assert_eq!(Value::from(1.1_f64).to_string(), "1.1");
+    assert_eq!(Value::from(1.1_f32).to_string(), "1.1");
+    assert_eq!(Value::from(1.1_f64).to_string(), "1.1");
 
     // Bytes
-    assert_eq!(Value::from(b"\xFE\xED\xD0\xD0").to_string(), "0xfeedd0d0");
+    assert_eq!(Value::from(b"\xFE\xED\xD0\xD0").to_string(), "0xfeedd0d0");
     assert_eq!(
-        Value::from(b"\xFE\xED\xD0\xD0\xDE\xAD\xBE\xEF").to_string(),
-        "0xfeedd0d0_deadbeef"
+        Value::from(b"\xFE\xED\xD0\xD0\xDE\xAD\xBE\xEF").to_string(),
+        "0xfeedd0d0_deadbeef"
     );
 
     // String
-    assert_eq!(Value::from("hello world").to_string(), "hello world");
+    assert_eq!(Value::from("hello world").to_string(), "hello world");
 
     // Sequence
     assert_eq!(
-        Value::from_sequence(Vec::<Value<'_>>::new()).to_string(),
-        "[]"
+        Value::from_sequence(Vec::<Value<'_>>::new()).to_string(),
+        "[]"
     );
     assert_eq!(
         Value::from_sequence(vec![Value::None]).to_string(),
-        "[None]"
+        "[None]"
     );
     assert_eq!(
         Value::from_sequence(vec![Value::None, Value::Unit]).to_string(),
-        "[None, ()]"
+        "[None, ()]"
     );
 
     // Mappings
     assert_eq!(
-        Value::from_mappings(Vec::<(Value<'_>, Value<'_>)>::new()).to_string(),
-        "{}"
+        Value::from_mappings(Vec::<(Value<'_>, Value<'_>)>::new()).to_string(),
+        "{}"
     );
     assert_eq!(
         Value::from_mappings(vec![(Value::from(0_u8), Value::None)]).to_string(),
-        "{0: None}"
+        "{0: None}"
     );
     assert_eq!(
         Value::from_mappings(vec![
@@ -3258,7 +3258,7 @@
             (Value::from(1_u8), Value::Unit)
         ])
         .to_string(),
-        "{0: None, 1: ()}"
+        "{0: None, 1: ()}"
     );
 }
 
@@ -3268,21 +3268,21 @@
     approx::assert_relative_eq!(
         Value::from(u8::MAX)
             .as_float()
-            .expect("u8 conversion failed")
+            .expect("u8 conversion failed")
             .as_f32()
-            .expect("f32 conversion failed"),
+            .expect("f32 conversion failed"),
         255_f32,
     );
     approx::assert_relative_eq!(
         Value::from(u32::MAX)
             .as_float()
-            .expect("u32 conversion failed")
+            .expect("u32 conversion failed")
             .as_f64(),
         4_294_967_295_f64,
     );
     assert!(Value::from(u32::MAX)
         .as_float()
-        .expect("u32 conversion failed")
+        .expect("u32 conversion failed")
         .as_f32()
         .is_err());
 
@@ -3291,12 +3291,12 @@
 
 #[test]
 fn value_as_integer_tests() {
-    macro_rules! test_signed {
+    macro_rules! test_signed {
         ($primitive:ty, $signed_method:ident, $unsigned:ty, $unsigned_method:ident, $float:ty) => {
             assert_eq!(
                 Value::from(<$primitive>::MAX)
                     .as_integer()
-                    .expect("integer conversion failed")
+                    .expect("integer conversion failed")
                     .$signed_method()
                     .unwrap(),
                 <$primitive>::MAX,
@@ -3304,7 +3304,7 @@
             assert_eq!(
                 Value::from(<$primitive>::MIN)
                     .as_integer()
-                    .expect("integer conversion failed")
+                    .expect("integer conversion failed")
                     .$signed_method()
                     .unwrap(),
                 <$primitive>::MIN,
@@ -3312,7 +3312,7 @@
             assert_eq!(
                 Value::from(<$primitive>::MAX)
                     .as_integer()
-                    .expect("integer conversion failed")
+                    .expect("integer conversion failed")
                     .$unsigned_method()
                     .unwrap(),
                 <$unsigned>::try_from(<$primitive>::MAX).unwrap(),
@@ -3321,7 +3321,7 @@
             assert_eq!(
                 Value::from(<$float>::from(<$primitive>::MAX))
                     .as_integer()
-                    .expect("integer conversion failed")
+                    .expect("integer conversion failed")
                     .$signed_method()
                     .unwrap(),
                 <$primitive>::MAX,
@@ -3329,7 +3329,7 @@
             assert_eq!(
                 Value::from(<$float>::from(<$primitive>::MIN))
                     .as_integer()
-                    .expect("integer conversion failed")
+                    .expect("integer conversion failed")
                     .$signed_method()
                     .unwrap(),
                 <$primitive>::MIN,
@@ -3337,7 +3337,7 @@
             assert_eq!(
                 Value::from(<$float>::from(<$primitive>::MAX))
                     .as_integer()
-                    .expect("integer conversion failed")
+                    .expect("integer conversion failed")
                     .$unsigned_method()
                     .unwrap(),
                 <$unsigned>::try_from(<$primitive>::MAX).unwrap(),
@@ -3349,32 +3349,32 @@
     test_signed!(i16, as_i16, u16, as_u16, f32);
     test_signed!(i32, as_i32, u32, as_u32, f64);
 
-    macro_rules! test_unsigned {
+    macro_rules! test_unsigned {
         ($primitive:ty, $unsigned_method:ident, $signed:ty, $signed_method:ident, $float:ty) => {
             assert_eq!(
                 Value::from(<$primitive>::MAX)
                     .as_integer()
-                    .expect("integer conversion failed")
+                    .expect("integer conversion failed")
                     .$unsigned_method()
                     .unwrap(),
                 <$primitive>::MAX,
             );
             assert!(Value::from(<$primitive>::MAX)
                 .as_integer()
-                .expect("integer conversion failed")
+                .expect("integer conversion failed")
                 .$signed_method()
                 .is_err());
             assert_eq!(
                 Value::from(<$float>::from(<$primitive>::MAX))
                     .as_integer()
-                    .expect("integer conversion failed")
+                    .expect("integer conversion failed")
                     .$unsigned_method()
                     .unwrap(),
                 <$primitive>::MAX,
             );
             assert!(Value::from(<$float>::from(<$primitive>::MAX))
                 .as_integer()
-                .expect("integer conversion failed")
+                .expect("integer conversion failed")
                 .$signed_method()
                 .is_err());
         };
@@ -3389,7 +3389,7 @@
 
 impl serde::Serializer for Serializer {
     type Error = ValueError;
-    type Ok = Value<'static>;
+    type Ok = Value<'static>;
     type SerializeMap = MappingsSerializer;
     type SerializeSeq = SequenceSerializer;
     type SerializeStruct = MappingsSerializer;
@@ -3477,22 +3477,22 @@
         Ok(Value::Unit)
     }
 
-    fn serialize_unit_struct(self, _name: &'static str) -> Result<Self::Ok, Self::Error> {
+    fn serialize_unit_struct(self, _name: &'static str) -> Result<Self::Ok, Self::Error> {
         Ok(Value::Unit)
     }
 
     fn serialize_unit_variant(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
     ) -> Result<Self::Ok, Self::Error> {
         Ok(Value::String(Cow::Borrowed(variant)))
     }
 
     fn serialize_newtype_struct<T>(
         self,
-        _name: &'static str,
+        _name: &'static str,
         value: &T,
     ) -> Result<Self::Ok, Self::Error>
     where
@@ -3503,9 +3503,9 @@
 
     fn serialize_newtype_variant<T>(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
         value: &T,
     ) -> Result<Self::Ok, Self::Error>
     where
@@ -3529,7 +3529,7 @@
 
     fn serialize_tuple_struct(
         self,
-        _name: &'static str,
+        _name: &'static str,
         len: usize,
     ) -> Result<Self::SerializeTupleStruct, Self::Error> {
         Ok(SequenceSerializer(Vec::with_capacity(len)))
@@ -3537,9 +3537,9 @@
 
     fn serialize_tuple_variant(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
         len: usize,
     ) -> Result<Self::SerializeTupleVariant, Self::Error> {
         Ok(TupleVariantSerializer {
@@ -3556,7 +3556,7 @@
 
     fn serialize_struct(
         self,
-        _name: &'static str,
+        _name: &'static str,
         len: usize,
     ) -> Result<Self::SerializeStruct, Self::Error> {
         Ok(MappingsSerializer(Vec::with_capacity(len)))
@@ -3564,9 +3564,9 @@
 
     fn serialize_struct_variant(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _variant_index: u32,
-        variant: &'static str,
+        variant: &'static str,
         len: usize,
     ) -> Result<Self::SerializeStructVariant, Self::Error> {
         Ok(StructVariantSerializer {
@@ -3576,11 +3576,11 @@
     }
 }
 
-struct SequenceSerializer(Vec<Value<'static>>);
+struct SequenceSerializer(Vec<Value<'static>>);
 
 impl SerializeSeq for SequenceSerializer {
     type Error = ValueError;
-    type Ok = Value<'static>;
+    type Ok = Value<'static>;
 
     fn serialize_element<T>(&mut self, value: &T) -> Result<(), Self::Error>
     where
@@ -3597,7 +3597,7 @@
 
 impl SerializeTuple for SequenceSerializer {
     type Error = ValueError;
-    type Ok = Value<'static>;
+    type Ok = Value<'static>;
 
     fn serialize_element<T>(&mut self, value: &T) -> Result<(), Self::Error>
     where
@@ -3614,7 +3614,7 @@
 
 impl SerializeTupleStruct for SequenceSerializer {
     type Error = ValueError;
-    type Ok = Value<'static>;
+    type Ok = Value<'static>;
 
     fn serialize_field<T>(&mut self, value: &T) -> Result<(), Self::Error>
     where
@@ -3630,13 +3630,13 @@
 }
 
 struct TupleVariantSerializer {
-    variant: &'static str,
-    sequence: Vec<Value<'static>>,
+    variant: &'static str,
+    sequence: Vec<Value<'static>>,
 }
 
 impl SerializeTupleVariant for TupleVariantSerializer {
     type Error = ValueError;
-    type Ok = Value<'static>;
+    type Ok = Value<'static>;
 
     fn serialize_field<T>(&mut self, value: &T) -> Result<(), Self::Error>
     where
@@ -3654,11 +3654,11 @@
     }
 }
 
-struct MappingsSerializer(Vec<(Value<'static>, Value<'static>)>);
+struct MappingsSerializer(Vec<(Value<'static>, Value<'static>)>);
 
 impl SerializeMap for MappingsSerializer {
     type Error = ValueError;
-    type Ok = Value<'static>;
+    type Ok = Value<'static>;
 
     fn serialize_key<T>(&mut self, key: &T) -> Result<(), Self::Error>
     where
@@ -3674,7 +3674,7 @@
     {
         self.0
             .last_mut()
-            .expect("serialize_value called without serialize_key")
+            .expect("serialize_value called without serialize_key")
             .1 = value.serialize(Serializer)?;
         Ok(())
     }
@@ -3686,9 +3686,9 @@
 
 impl SerializeStruct for MappingsSerializer {
     type Error = ValueError;
-    type Ok = Value<'static>;
+    type Ok = Value<'static>;
 
-    fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<(), Self::Error>
+    fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<(), Self::Error>
     where
         T: Serialize + ?Sized,
     {
@@ -3705,15 +3705,15 @@
 }
 
 struct StructVariantSerializer {
-    variant: &'static str,
-    mappings: Vec<(Value<'static>, Value<'static>)>,
+    variant: &'static str,
+    mappings: Vec<(Value<'static>, Value<'static>)>,
 }
 
 impl SerializeStructVariant for StructVariantSerializer {
     type Error = ValueError;
-    type Ok = Value<'static>;
+    type Ok = Value<'static>;
 
-    fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<(), Self::Error>
+    fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<(), Self::Error>
     where
         T: Serialize + ?Sized,
     {
@@ -3732,14 +3732,14 @@
     }
 }
 
-struct Deserializer<'de>(&'de Value<'de>);
+struct Deserializer<'de>(&'de Value<'de>);
 
-impl<'de> serde::Deserializer<'de> for Deserializer<'de> {
+impl<'de> serde::Deserializer<'de> for Deserializer<'de> {
     type Error = ValueError;
 
     fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         match &self.0 {
             Value::None => visitor.visit_none(),
@@ -3770,13 +3770,13 @@
 
     fn deserialize_bool<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Bool(value) = &self.0 {
             visitor.visit_bool(*value)
         } else {
             Err(ValueError::Expected {
-                kind: "bool",
+                kind: "bool",
                 value: self.0.to_static(),
             })
         }
@@ -3784,7 +3784,7 @@
 
     fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_i8() {
@@ -3793,14 +3793,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "i8",
+            kind: "i8",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_i16() {
@@ -3809,14 +3809,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "i16",
+            kind: "i16",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_i32() {
@@ -3825,14 +3825,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "i32",
+            kind: "i32",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_i64() {
@@ -3841,14 +3841,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "i64",
+            kind: "i64",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_i128<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_i128() {
@@ -3857,14 +3857,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "i128",
+            kind: "i128",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_u8() {
@@ -3873,14 +3873,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "u8",
+            kind: "u8",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_u16() {
@@ -3889,14 +3889,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "u16",
+            kind: "u16",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_u32() {
@@ -3905,14 +3905,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "u32",
+            kind: "u32",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_u64() {
@@ -3921,14 +3921,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "u64",
+            kind: "u64",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_u128<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_u128() {
@@ -3937,14 +3937,14 @@
         }
 
         Err(ValueError::Expected {
-            kind: "u128",
+            kind: "u128",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Float(value) = &self.0 {
             if let Ok(value) = value.as_f32() {
@@ -3953,20 +3953,20 @@
         }
 
         Err(ValueError::Expected {
-            kind: "f32",
+            kind: "f32",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Float(value) = &self.0 {
             visitor.visit_f64(value.as_f64())
         } else {
             Err(ValueError::Expected {
-                kind: "f64",
+                kind: "f64",
                 value: self.0.to_static(),
             })
         }
@@ -3974,7 +3974,7 @@
 
     fn deserialize_char<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Integer(value) = &self.0 {
             if let Ok(value) = value.as_u32() {
@@ -3985,20 +3985,20 @@
         }
 
         Err(ValueError::Expected {
-            kind: "char",
+            kind: "char",
             value: self.0.to_static(),
         })
     }
 
     fn deserialize_str<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::String(value) = &self.0 {
             visitor.visit_borrowed_str(value)
         } else {
             Err(ValueError::Expected {
-                kind: "str",
+                kind: "str",
                 value: self.0.to_static(),
             })
         }
@@ -4006,13 +4006,13 @@
 
     fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::String(value) = &self.0 {
             visitor.visit_borrowed_str(value)
         } else {
             Err(ValueError::Expected {
-                kind: "String",
+                kind: "String",
                 value: self.0.to_static(),
             })
         }
@@ -4020,13 +4020,13 @@
 
     fn deserialize_bytes<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Bytes(value) = &self.0 {
             visitor.visit_borrowed_bytes(value)
         } else {
             Err(ValueError::Expected {
-                kind: "bytes",
+                kind: "bytes",
                 value: self.0.to_static(),
             })
         }
@@ -4034,13 +4034,13 @@
 
     fn deserialize_byte_buf<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Bytes(value) = &self.0 {
             visitor.visit_borrowed_bytes(value)
         } else {
             Err(ValueError::Expected {
-                kind: "byte buf",
+                kind: "byte buf",
                 value: self.0.to_static(),
             })
         }
@@ -4048,7 +4048,7 @@
 
     fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if matches!(&self.0, Value::None) {
             visitor.visit_none()
@@ -4059,13 +4059,13 @@
 
     fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Unit = &self.0 {
             visitor.visit_unit()
         } else {
             Err(ValueError::Expected {
-                kind: "()",
+                kind: "()",
                 value: self.0.to_static(),
             })
         }
@@ -4073,17 +4073,17 @@
 
     fn deserialize_unit_struct<V>(
         self,
-        _name: &'static str,
+        _name: &'static str,
         visitor: V,
     ) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Unit = &self.0 {
             visitor.visit_unit()
         } else {
             Err(ValueError::Expected {
-                kind: "()",
+                kind: "()",
                 value: self.0.to_static(),
             })
         }
@@ -4091,24 +4091,24 @@
 
     fn deserialize_newtype_struct<V>(
         self,
-        _name: &'static str,
+        _name: &'static str,
         visitor: V,
     ) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         visitor.visit_newtype_struct(self)
     }
 
     fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Sequence(sequence) = &self.0 {
             visitor.visit_seq(SequenceDeserializer(sequence))
         } else {
             Err(ValueError::Expected {
-                kind: "sequence",
+                kind: "sequence",
                 value: self.0.to_static(),
             })
         }
@@ -4116,13 +4116,13 @@
 
     fn deserialize_tuple<V>(self, _len: usize, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Sequence(sequence) = &self.0 {
             visitor.visit_seq(SequenceDeserializer(sequence))
         } else {
             Err(ValueError::Expected {
-                kind: "tuple",
+                kind: "tuple",
                 value: self.0.to_static(),
             })
         }
@@ -4130,18 +4130,18 @@
 
     fn deserialize_tuple_struct<V>(
         self,
-        _name: &'static str,
+        _name: &'static str,
         _len: usize,
         visitor: V,
     ) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Sequence(sequence) = &self.0 {
             visitor.visit_seq(SequenceDeserializer(sequence))
         } else {
             Err(ValueError::Expected {
-                kind: "tuple struct",
+                kind: "tuple struct",
                 value: self.0.to_static(),
             })
         }
@@ -4149,13 +4149,13 @@
 
     fn deserialize_map<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Mappings(sequence) = &self.0 {
             visitor.visit_map(MappingsDeserializer(sequence))
         } else {
             Err(ValueError::Expected {
-                kind: "map",
+                kind: "map",
                 value: self.0.to_static(),
             })
         }
@@ -4163,18 +4163,18 @@
 
     fn deserialize_struct<V>(
         self,
-        _name: &'static str,
-        _fields: &'static [&'static str],
+        _name: &'static str,
+        _fields: &'static [&'static str],
         visitor: V,
     ) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Mappings(sequence) = &self.0 {
             visitor.visit_map(MappingsDeserializer(sequence))
         } else {
             Err(ValueError::Expected {
-                kind: "map",
+                kind: "map",
                 value: self.0.to_static(),
             })
         }
@@ -4182,38 +4182,38 @@
 
     fn deserialize_enum<V>(
         self,
-        _name: &'static str,
-        _variants: &'static [&'static str],
+        _name: &'static str,
+        _variants: &'static [&'static str],
         visitor: V,
     ) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         visitor.visit_enum(self)
     }
 
     fn deserialize_identifier<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         self.deserialize_str(visitor)
     }
 
     fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         self.deserialize_any(visitor)
     }
 }
 
-impl<'de> EnumAccess<'de> for Deserializer<'de> {
+impl<'de> EnumAccess<'de> for Deserializer<'de> {
     type Error = ValueError;
     type Variant = Self;
 
     fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant), Self::Error>
     where
-        V: serde::de::DeserializeSeed<'de>,
+        V: serde::de::DeserializeSeed<'de>,
     {
         match &self.0 {
             Value::Mappings(mapping) => {
@@ -4230,13 +4230,13 @@
         }
 
         Err(ValueError::Expected {
-            kind: "enum variant",
+            kind: "enum variant",
             value: self.0.to_static(),
         })
     }
 }
 
-impl<'de> VariantAccess<'de> for Deserializer<'de> {
+impl<'de> VariantAccess<'de> for Deserializer<'de> {
     type Error = ValueError;
 
     fn unit_variant(self) -> Result<(), Self::Error> {
@@ -4244,7 +4244,7 @@
             Ok(())
         } else {
             Err(ValueError::Expected {
-                kind: "unit",
+                kind: "unit",
                 value: self.0.to_static(),
             })
         }
@@ -4252,20 +4252,20 @@
 
     fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, Self::Error>
     where
-        T: serde::de::DeserializeSeed<'de>,
+        T: serde::de::DeserializeSeed<'de>,
     {
         seed.deserialize(self)
     }
 
     fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Sequence(sequence) = &self.0 {
             visitor.visit_seq(SequenceDeserializer(sequence))
         } else {
             Err(ValueError::Expected {
-                kind: "tuple variant",
+                kind: "tuple variant",
                 value: self.0.to_static(),
             })
         }
@@ -4273,31 +4273,31 @@
 
     fn struct_variant<V>(
         self,
-        _fields: &'static [&'static str],
+        _fields: &'static [&'static str],
         visitor: V,
     ) -> Result<V::Value, Self::Error>
     where
-        V: Visitor<'de>,
+        V: Visitor<'de>,
     {
         if let Value::Mappings(mappings) = &self.0 {
             visitor.visit_map(MappingsDeserializer(mappings))
         } else {
             Err(ValueError::Expected {
-                kind: "struct variant",
+                kind: "struct variant",
                 value: self.0.to_static(),
             })
         }
     }
 }
 
-struct SequenceDeserializer<'de>(&'de [Value<'de>]);
+struct SequenceDeserializer<'de>(&'de [Value<'de>]);
 
-impl<'de> SeqAccess<'de> for SequenceDeserializer<'de> {
+impl<'de> SeqAccess<'de> for SequenceDeserializer<'de> {
     type Error = ValueError;
 
     fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
     where
-        T: serde::de::DeserializeSeed<'de>,
+        T: serde::de::DeserializeSeed<'de>,
     {
         if self.0.is_empty() {
             Ok(None)
@@ -4313,14 +4313,14 @@
     }
 }
 
-struct MappingsDeserializer<'de>(&'de [(Value<'de>, Value<'de>)]);
+struct MappingsDeserializer<'de>(&'de [(Value<'de>, Value<'de>)]);
 
-impl<'de> MapAccess<'de> for MappingsDeserializer<'de> {
+impl<'de> MapAccess<'de> for MappingsDeserializer<'de> {
     type Error = ValueError;
 
     fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Self::Error>
     where
-        K: serde::de::DeserializeSeed<'de>,
+        K: serde::de::DeserializeSeed<'de>,
     {
         if self.0.is_empty() {
             Ok(None)
@@ -4332,7 +4332,7 @@
 
     fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Self::Error>
     where
-        V: serde::de::DeserializeSeed<'de>,
+        V: serde::de::DeserializeSeed<'de>,
     {
         let value = seed.deserialize(Deserializer(&self.0[0].1))?;
         self.0 = &self.0[1..];
@@ -4351,9 +4351,9 @@
     /// that kind.
     Expected {
         /// The kind of data expected.
-        kind: &'static str,
+        kind: &'static str,
         /// The value that was encountered.
-        value: Value<'static>,
+        value: Value<'static>,
     },
     /// A custom deserialization error. These errors originate outside of Pot.
     Custom(String),
@@ -4362,9 +4362,9 @@
 impl std::error::Error for ValueError {}
 
 impl Display for ValueError {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         match self {
-            ValueError::Expected { kind, value } => write!(f, "expected {kind} but got {value}"),
+            ValueError::Expected { kind, value } => write!(f, "expected {kind} but got {value}"),
             ValueError::Custom(msg) => f.write_str(msg),
         }
     }
@@ -4392,26 +4392,26 @@
 fn is_empty() {
     for expected_empty in [
         Value::None,
-        Value::Bytes(Cow::Borrowed(b"")),
-        Value::String(Cow::Borrowed("")),
+        Value::Bytes(Cow::Borrowed(b"")),
+        Value::String(Cow::Borrowed("")),
         Value::Sequence(vec![]),
         Value::Mappings(vec![]),
     ] {
-        assert!(expected_empty.is_empty(), "{expected_empty} was not empty");
+        assert!(expected_empty.is_empty(), "{expected_empty} was not empty");
     }
     for expected_not_empty in [
         Value::Unit,
         Value::Bool(true),
         Value::Integer(Integer::from(0)),
         Value::Float(Float::from(0f32)),
-        Value::Bytes(Cow::Borrowed(b"a")),
-        Value::String(Cow::Borrowed("a")),
+        Value::Bytes(Cow::Borrowed(b"a")),
+        Value::String(Cow::Borrowed("a")),
         Value::Sequence(vec![Value::None]),
         Value::Mappings(vec![(Value::None, Value::None)]),
     ] {
         assert!(
             !expected_not_empty.is_empty(),
-            "{expected_not_empty} was empty"
+            "{expected_not_empty} was empty"
         );
     }
 }
@@ -4423,24 +4423,24 @@
         Value::Bool(true),
         Value::Integer(Integer::from(1)),
         Value::Float(Float::from(1f32)),
-        Value::Bytes(Cow::Borrowed(b"a")),
-        Value::String(Cow::Borrowed("a")),
+        Value::Bytes(Cow::Borrowed(b"a")),
+        Value::String(Cow::Borrowed("a")),
         Value::Sequence(vec![Value::None]),
         Value::Mappings(vec![(Value::None, Value::None)]),
     ] {
-        assert!(expected_true.as_bool(), "{expected_true} was false");
+        assert!(expected_true.as_bool(), "{expected_true} was false");
     }
     for expected_false in [
         Value::None,
         Value::Bool(false),
         Value::Integer(Integer::from(0)),
         Value::Float(Float::from(0f32)),
-        Value::Bytes(Cow::Borrowed(b"")),
-        Value::String(Cow::Borrowed("")),
+        Value::Bytes(Cow::Borrowed(b"")),
+        Value::String(Cow::Borrowed("")),
         Value::Sequence(vec![]),
         Value::Mappings(vec![]),
     ] {
-        assert!(!expected_false.as_bool(), "{expected_false} was true");
+        assert!(!expected_false.as_bool(), "{expected_false} was true");
     }
 }
 
@@ -4473,15 +4473,15 @@
 
 #[test]
 fn as_str() {
-    assert_eq!(Value::from("asdf").as_str(), Some("asdf"));
-    assert_eq!(Value::from(b"asdf").as_str(), Some("asdf"));
+    assert_eq!(Value::from("asdf").as_str(), Some("asdf"));
+    assert_eq!(Value::from(b"asdf").as_str(), Some("asdf"));
     assert_eq!(Value::from(false).as_str(), None);
 }
 
 #[test]
 fn as_bytes() {
-    assert_eq!(Value::from(b"asdf").as_bytes(), Some(&b"asdf"[..]));
-    assert_eq!(Value::from("asdf").as_bytes(), Some(&b"asdf"[..]));
+    assert_eq!(Value::from(b"asdf").as_bytes(), Some(&b"asdf"[..]));
+    assert_eq!(Value::from("asdf").as_bytes(), Some(&b"asdf"[..]));
     assert_eq!(Value::from(false).as_bytes(), None);
 }
 
@@ -4531,8 +4531,8 @@
         Value::from(true),
         Value::from(1_i32),
         Value::from(1_f32),
-        Value::from(&b"hi"[..]),
-        Value::from("hi"),
+        Value::from(&b"hi"[..]),
+        Value::from("hi"),
         Value::from_sequence([1]),
         Value::from_mappings([(1, 2)]),
     ] {
@@ -4550,18 +4550,18 @@
 
 #[test]
 fn owned_deref() {
-    let mut owned_value = OwnedValue::from(&Value::from("hello".to_string()));
-    assert_eq!(owned_value.as_str(), Some("hello"));
+    let mut owned_value = OwnedValue::from(&Value::from("hello".to_string()));
+    assert_eq!(owned_value.as_str(), Some("hello"));
     let Value::String(Cow::Owned(str)) = &mut *owned_value else {
         unreachable!()
     };
-    str.push_str(", world");
-    assert_eq!(owned_value.as_str(), Some("hello, world"));
+    str.push_str(", world");
+    assert_eq!(owned_value.as_str(), Some("hello, world"));
 }
 
 #[test]
 fn owned_serialization() {
-    let owned_value = OwnedValue::from(Value::from(b"asdf".to_vec()));
+    let owned_value = OwnedValue::from(Value::from(b"asdf".to_vec()));
     let serialized = crate::to_vec(&owned_value).unwrap();
     let deserialized_owned: OwnedValue = crate::from_slice(&serialized).unwrap();
     assert_eq!(deserialized_owned, owned_value);
diff --git a/main/src/xtask/main.rs.html b/main/src/xtask/main.rs.html
index 8e11f88f..cec59f89 100644
--- a/main/src/xtask/main.rs.html
+++ b/main/src/xtask/main.rs.html
@@ -1,4 +1,4 @@
-main.rs - source
1
+main.rs - source
1
 2
 3
 4
@@ -35,7 +35,7 @@
 
 impl khonsu_tools::publish::Config for Config {
     fn paths() -> Vec<String> {
-        vec![String::from("pot")]
+        vec![String::from("pot")]
     }
 }
 
\ No newline at end of file diff --git a/main/static.files/ayu-614652228113ac93.css b/main/static.files/ayu-614652228113ac93.css deleted file mode 100644 index 8fd09c9e..00000000 --- a/main/static.files/ayu-614652228113ac93.css +++ /dev/null @@ -1 +0,0 @@ - :root{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--source-sidebar-background-selected:#14191f;--source-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:rgb(91,59,1);--scrape-example-code-line-highlight-focus:rgb(124,75,15);--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);}h1,h2,h3,h4,h1 a,.sidebar h2 a,.sidebar h3 a,#source-sidebar>.title{color:#fff;}h4{border:none;}.docblock code{color:#ffb454;}.docblock a>code{color:#39AFD7 !important;}.code-header,.docblock pre>code,pre,pre>code,.item-info code,.rustdoc.source .example-wrap{color:#e6e1cf;}.sidebar .current,.sidebar a:hover,#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus,#source-sidebar div.files>a.selected{color:#ffb44c;}.sidebar-elems .location{color:#ff7733;}.src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}.search-results a:hover,.search-results a:focus{color:#fff !important;background-color:#3c3c3c;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}#search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}#search-tabs>button:not(.selected){border:none;background-color:transparent !important;}#search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#settings-menu>a img{filter:invert(100);} \ No newline at end of file diff --git a/main/static.files/clipboard-7571035ce49a181d.svg b/main/static.files/clipboard-7571035ce49a181d.svg deleted file mode 100644 index 8adbd996..00000000 --- a/main/static.files/clipboard-7571035ce49a181d.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/main/static.files/dark-1097f8e92a01e3cf.css b/main/static.files/dark-1097f8e92a01e3cf.css deleted file mode 100644 index 1e5e7d19..00000000 --- a/main/static.files/dark-1097f8e92a01e3cf.css +++ /dev/null @@ -1 +0,0 @@ -:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--source-sidebar-background-selected:#333;--source-sidebar-background-hover:#444;--table-alt-row-background-color:#2A2A2A;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:rgb(91,59,1);--scrape-example-code-line-highlight-focus:rgb(124,75,15);--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);} \ No newline at end of file diff --git a/main/static.files/favicon-16x16-8b506e7a72182f1c.png b/main/static.files/favicon-16x16-8b506e7a72182f1c.png deleted file mode 100644 index ea4b45cae1618e6e20e6d61897da953f34b66b30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 715 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^xl_H+M9WCijSl0AZa z85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YDR+ueoXe|!I#{XiaP zfk$L9P|ym58ULAS1_A}yOFVsD*`G1;@(QxEEoEaloaX$3oUhmn3B1b>^ zXS8u>Ub4$r*u2F1FEiJ>rQJ&x%nC}Q!>*kacg*^JAVaGgCxj?;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1UT zt3o15f)dLW3X1a6GILTDN-7Id6*3D-k{K8(<~;ty!%-Nfp>fLp^cl~mK@7~w+0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function loadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(link)}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadCss(getVar("static-root-path")+getVar("settings-css"));loadScript(getVar("static-root-path")+getVar("settings-js"));preLoadCss(getVar("static-root-path")+getVar("theme-light-css"));preLoadCss(getVar("static-root-path")+getVar("theme-dark-css"));preLoadCss(getVar("static-root-path")+getVar("theme-ayu-css"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const current_page=document.location.href.split("/").pop();const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Definitions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";if(window.rootPath!=="./"&&crate===window.currentCrate){link.className="current"}link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=function(ev){if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=function(ev){if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,e)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=function(){this.TOOLTIP_FORCE_VISIBLE=this.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!this.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(this);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=function(ev){if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(this,true)};e.onpointermove=function(ev){if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(this,true)};e.onpointerleave=function(ev){if(ev.pointerType!=="mouse"){return}if(!this.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ -the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ - restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ - enum, trait, type, macro, \ - and const.","Search functions by type signature (e.g., vec -> usize or \ - -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ - your request: \"string\"","Look for functions that accept or return \ - slices and \ - arrays by writing \ - square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=function(switchFocus){hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=function(){onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/main/static.files/main-20a3ad099b048cf2.js b/main/static.files/main-20a3ad099b048cf2.js new file mode 100644 index 00000000..133116e4 --- /dev/null +++ b/main/static.files/main-20a3ad099b048cf2.js @@ -0,0 +1,11 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}},)}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.classList.add("clicked");if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){reset_button_timeout=null;but.classList.remove("clicked")}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/main/static.files/noscript-13285aec31fa243e.css b/main/static.files/noscript-13285aec31fa243e.css deleted file mode 100644 index c32e0cb1..00000000 --- a/main/static.files/noscript-13285aec31fa243e.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.source .sidebar{display:none;}.notable-traits{display:none;} \ No newline at end of file diff --git a/main/static.files/noscript-df360f571f6edeae.css b/main/static.files/noscript-df360f571f6edeae.css new file mode 100644 index 00000000..4c310ae5 --- /dev/null +++ b/main/static.files/noscript-df360f571f6edeae.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/main/static.files/rustdoc-9bb858ba049f1f21.css b/main/static.files/rustdoc-9bb858ba049f1f21.css deleted file mode 100644 index 73eacd80..00000000 --- a/main/static.files/rustdoc-9bb858ba049f1f21.css +++ /dev/null @@ -1,8 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.srclink,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}p:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.source .content pre{padding:20px;}.rustdoc.source .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 200px;overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;}.rustdoc.source .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;z-index:1;}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#source-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.source .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.source-sidebar-expanded .source .sidebar{overflow-y:auto;flex-basis:300px;}.source-sidebar-expanded .source .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.sidebar .logo-container{margin-top:10px;margin-bottom:10px;text-align:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.source) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.source .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.method .where,.fn .where,.where.fmt-newline{display:block;white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.source nav.sub{margin:0 0 15px 0;}.small-section-header{display:block;position:relative;}.small-section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block a.current{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}@-moz-document url-prefix(){#crate-search{padding-left:0px;padding-right:19px;}}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ - ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name span.alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.popover{position:absolute;top:100%;right:0;z-index:2;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{min-height:36px;display:flex;padding:3px;margin-bottom:5px;align-items:center;vertical-align:text-bottom;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji{font-size:1.25rem;margin-right:0.3rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.source .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#source-sidebar{width:100%;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--source-sidebar-background-hover);}#source-sidebar div.files>a.selected{background-color:var(--source-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#settings-menu>a,#help-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:var(--settings-button-border-focus);}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.source main,.rustdoc.source .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.source-sidebar-expanded .source .sidebar,.rustdoc:not(.source) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#search-tabs .count{display:block;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.source-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.source-sidebar-expanded .source .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.source nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.srclink,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;} \ No newline at end of file diff --git a/main/static.files/rustdoc-dd39b87e5fcfba68.css b/main/static.files/rustdoc-dd39b87e5fcfba68.css new file mode 100644 index 00000000..77f89832 --- /dev/null +++ b/main/static.files/rustdoc-dd39b87e5fcfba68.css @@ -0,0 +1,46 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;margin-right:0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#settings-menu>a{line-height:0;font-size:0;}#settings-menu>a:before{content:url('data:image/svg+xml,\ + ');width:22px;height:22px;filter:var(--settings-menu-filter);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;width:33px;margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:url('data:image/svg+xml,\ +\ +\ +');width:19px;height:18px;}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:url('data:image/svg+xml,\ + \ + ');}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:none;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/main/static.files/search-d52510db62a78183.js b/main/static.files/search-d52510db62a78183.js new file mode 100644 index 00000000..a2824f29 --- /dev/null +++ b/main/static.files/search-d52510db62a78183.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let searchIndexDeprecated;let searchIndexEmptyDesc;let functionTypeFingerprint;let currentResults;const typeNameIdMap=new Map();const ALIASES=new Map();const typeNameIdOfArray=buildTypeMapIndex("array");const typeNameIdOfSlice=buildTypeMapIndex("slice");const typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");const typeNameIdOfTuple=buildTypeMapIndex("tuple");const typeNameIdOfUnit=buildTypeMapIndex("unit");const typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");const typeNameIdOfFn=buildTypeMapIndex("fn");const typeNameIdOfFnMut=buildTypeMapIndex("fnmut");const typeNameIdOfFnOnce=buildTypeMapIndex("fnonce");const typeNameIdOfHof=buildTypeMapIndex("->");function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name,gen.bindingName.generics);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}return end}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}async function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}async function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(passesUnification){return true}}return false},unboxingDepth,);if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(queryElem.id===typeNameIdOfHof&&(fnType.id===typeNameIdOfFn||fnType.id===typeNameIdOfFnMut||fnType.id===typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp,unboxingDepth,)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}function checkType(row,elem,whereClause,mgens,unboxingDepth){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0&&mgens===null){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth+1,)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit&&elem.id!==typeNameIdOfHof){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth,)}}return unifyFunctionTypes([row],[elem],whereClause,mgens,null,unboxingDepth)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance,){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint,);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause,null,0);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause,null,0);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,null,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=editDistance(name,elem.normalizedPathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}),)}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;for(const item of array){const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)}}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,true),addTab(results.in_args,results.query,false),addTab(results.returned,results.query,false),]);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));await showResults(await execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,exactPath:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchTypeCallback(lowercasePaths){return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;for(let i=0;i=start&&value<=(start+lenm1)){return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){const l=this.cardinality*2;for(let i=0;i>3]&(1<<(value&7)))}}function buildIndex(rawSearchIndex){searchIndex=[];searchIndexDeprecated=new Map();searchIndexEmptyDesc=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const itemDescShardDecoder=new VlqHexDecoder(crateCorpus.D,noop=>noop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),bitIndex:0,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxs=crateCorpus.i;const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3?itemPaths.get(elem[3]):path;lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath});paths[i]={ty,name,path,exactPath}}lastPath="";len=itemTypes.length;for(let i=0;i=descShard.len&&!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate,ty:itemTypes.charCodeAt(i)-charA,name:itemNames[i],path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;if(!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;searchState.descShards.set(crate,descShardList)}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/main/static.files/search-f6292fe389d70017.js b/main/static.files/search-f6292fe389d70017.js deleted file mode 100644 index c91355a6..00000000 --- a/main/static.files/search-f6292fe389d70017.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict";(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias",];const longItemTypes=["module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","primitive type","assoc type","constant","assoc const","union","foreign type","keyword","existential type","attribute macro","derive macro","trait alias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;function buildTypeMapIndex(name){if(name===""||name===null){return-1}if(typeNameIdMap.has(name)){return typeNameIdMap.get(name)}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,id);return id}}function isWhitespace(c){return" \t\n\r".indexOf(c)!==-1}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return",>-]".indexOf(c)!==-1}function isStopCharacter(c){return isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","}function isPathSeparator(c){return c===":"||isWhitespace(c)}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(!isWhitespace(c)){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}return{name:"never",id:-1,fullPath:["never"],pathWithoutLast:[],pathLast:"never",generics:[],typeFilter:"primitive",}}if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(path.includes("::::")){throw["Unexpected ","::::"]}else if(path.includes(" ::")){throw["Unexpected "," ::"]}else if(path.includes(":: ")){throw["Unexpected ",":: "]}const pathSegments=path.split(/::|\s+/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}return{name:name.trim(),id:-1,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast:pathSegments[pathSegments.length-1],generics:generics,typeFilter,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",","," or ",endChar,...extra,", found ",c,]}throw["Expected ",",",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(isWhitespace(c)){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,literalSearch:false,error:null,correction:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}}userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id>-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of result_list){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(result_list)}function checkGenerics(fnType,queryElem){return unifyFunctionTypes(fnType.generics,queryElem.generics)}function unifyFunctionTypes(fnTypes,queryElems){if(queryElems.length===0){return true}if(!fnTypes||fnTypes.length===0){return false}const queryElemSet=new Map();const addQueryElemToQueryElemSet=function addQueryElemToQueryElemSet(queryElem){let currentQueryElemList;if(queryElemSet.has(queryElem.id)){currentQueryElemList=queryElemSet.get(queryElem.id)}else{currentQueryElemList=[];queryElemSet.set(queryElem.id,currentQueryElemList)}currentQueryElemList.push(queryElem)};for(const queryElem of queryElems){addQueryElemToQueryElemSet(queryElem)}const fnTypeSet=new Map();const addFnTypeToFnTypeSet=function addFnTypeToFnTypeSet(fnType){const queryContainsArrayOrSliceElem=queryElemSet.has(typeNameIdOfArrayOrSlice);if(fnType.id===-1||!(queryElemSet.has(fnType.id)||(fnType.id===typeNameIdOfSlice&&queryContainsArrayOrSliceElem)||(fnType.id===typeNameIdOfArray&&queryContainsArrayOrSliceElem))){for(const innerFnType of fnType.generics){addFnTypeToFnTypeSet(innerFnType)}return}let currentQueryElemList=queryElemSet.get(fnType.id)||[];let matchIdx=currentQueryElemList.findIndex(queryElem=>{return typePassesFilter(queryElem.typeFilter,fnType.ty)&&checkGenerics(fnType,queryElem)});if(matchIdx===-1&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)&&queryContainsArrayOrSliceElem){currentQueryElemList=queryElemSet.get(typeNameIdOfArrayOrSlice)||[];matchIdx=currentQueryElemList.findIndex(queryElem=>{return typePassesFilter(queryElem.typeFilter,fnType.ty)&&checkGenerics(fnType,queryElem)})}if(matchIdx===-1){for(const innerFnType of fnType.generics){addFnTypeToFnTypeSet(innerFnType)}return}let currentFnTypeList;if(fnTypeSet.has(fnType.id)){currentFnTypeList=fnTypeSet.get(fnType.id)}else{currentFnTypeList=[];fnTypeSet.set(fnType.id,currentFnTypeList)}currentFnTypeList.push(fnType)};for(const fnType of fnTypes){addFnTypeToFnTypeSet(fnType)}const doHandleQueryElemList=(currentFnTypeList,queryElemList)=>{if(queryElemList.length===0){return true}const queryElem=queryElemList.pop();const l=currentFnTypeList.length;for(let i=0;i{if(!fnTypeSet.has(id)){if(id===typeNameIdOfArrayOrSlice){return handleQueryElemList(typeNameIdOfSlice,queryElemList)||handleQueryElemList(typeNameIdOfArray,queryElemList)}return false}const currentFnTypeList=fnTypeSet.get(id);if(currentFnTypeList.length0?checkIfInList(row.generics,elem):false}const matchesExact=row.id===elem.id;const matchesArrayOrSlice=elem.id===typeNameIdOfArrayOrSlice&&(row.id===typeNameIdOfSlice||row.id===typeNameIdOfArray);if((matchesExact||matchesArrayOrSlice)&&typePassesFilter(elem.typeFilter,row.ty)){if(elem.generics.length>0){return checkGenerics(row,elem)}return true}return checkIfInList(row.generics,elem)}function checkPath(contains,ty,maxEditDistance){if(contains.length===0){return 0}let ret_dist=maxEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return maxEditDistance+1}for(let i=0;ilength){break}let dist_total=0;let aborted=false;for(let x=0;xmaxEditDistance){aborted=true;break}dist_total+=dist}if(!aborted){ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){const inBounds=dist<=maxEditDistance||index!==-1;if(dist===0||(!parsedQuery.literalSearch&&inBounds)){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let index=-1,path_dist=0;const fullId=row.id;const searchWord=searchWords[pos];const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem);if(in_args){addIntoResults(results_in_args,fullId,pos,-1,0,0,maxEditDistance)}const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem);if(returned){addIntoResults(results_returned,fullId,pos,-1,0,0,maxEditDistance)}if(!typePassesFilter(elem.typeFilter,row.ty)){return}const row_index=row.normalizedName.indexOf(elem.pathLast);const word_index=searchWord.indexOf(elem.pathLast);if(row_index===-1){index=word_index}else if(word_index===-1){index=row_index}else if(word_index1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(searchWord,elem.pathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems)){return}if(!unifyFunctionTypes(row.type.output,parsedQuery.returned)){return}addIntoResults(results,row.id,pos,0,0,0,Number.MAX_VALUE)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);function convertNameToId(elem){if(typeNameIdMap.has(elem.name)){elem.id=typeNameIdMap.get(elem.name)}else if(!parsedQuery.literalSearch){let match=-1;let matchDist=maxEditDistance+1;let matchName="";for(const[name,id]of typeNameIdMap){const dist=editDistance(name,elem.name,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==-1){parsedQuery.correction=matchName}elem.id=match}for(const elem2 of elem.generics){convertNameToId(elem2)}}for(const elem of parsedQuery.elems){convertNameToId(elem)}for(const elem of parsedQuery.returned){convertNameToId(elem)}if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||editDistance(name,key,maxEditDistance)<=maxEditDistance)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";length+=1;const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){const alias=document.createElement("span");alias.className="alias";const bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",`\ -${typeName}\ -
\ - ${item.displayPath}${name}\ -
`);link.appendChild(resultName);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(e,forced){if(e){e.preventDefault()}const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;return types.map(type=>{let pathIndex,generics;if(typeof type==="number"){pathIndex=type;generics=[]}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths)}return{id:pathIndex===0?-1:buildTypeMapIndex(lowercasePaths[pathIndex-1].name),ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:generics,}})}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){const pathIndex=functionSearchType[INPUTS_DATA];inputs=[{id:pathIndex===0?-1:buildTypeMapIndex(lowercasePaths[pathIndex-1].name),ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){const pathIndex=functionSearchType[OUTPUT_DATA];output=[{id:pathIndex===0?-1:buildTypeMapIndex(lowercasePaths[pathIndex-1].name),ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}return{inputs,output,}}function buildIndex(rawSearchIndex){searchIndex=[];const searchWords=[];typeNameIdMap=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;typeNameIdOfArray=buildTypeMapIndex("array");typeNameIdOfSlice=buildTypeMapIndex("slice");typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");for(const crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}let crateSize=0;const crateCorpus=rawSearchIndex[crate];searchWords.push(crate);const crateRow={crate:crate,ty:1,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),deprecated:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const deprecatedItems=new Set(crateCorpus.c);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:buildFunctionSearchType(itemFunctionSearchTypes[i],lowercasePaths),id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/main/static.files/settings-4313503d2e1961c2.js b/main/static.files/settings-4313503d2e1961c2.js new file mode 100644 index 00000000..ab425fe4 --- /dev/null +++ b/main/static.files/settings-4313503d2e1961c2.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/main/static.files/settings-8c76f75bfb6bd192.css b/main/static.files/settings-8c76f75bfb6bd192.css deleted file mode 100644 index 5241bb86..00000000 --- a/main/static.files/settings-8c76f75bfb6bd192.css +++ /dev/null @@ -1,3 +0,0 @@ -.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ - \ - ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;} \ No newline at end of file diff --git a/main/static.files/settings-de11bff964e9d4e5.js b/main/static.files/settings-de11bff964e9d4e5.js deleted file mode 100644 index cc508a86..00000000 --- a/main/static.files/settings-de11bff964e9d4e5.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
-
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=function(event){event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=function(event){if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/main/static.files/source-script-106908c7a7964ba4.js b/main/static.files/source-script-106908c7a7964ba4.js deleted file mode 100644 index 191bf6d9..00000000 --- a/main/static.files/source-script-106908c7a7964ba4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth"){addClass(document.documentElement,"source-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"source-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file diff --git a/main/static.files/src-script-e66d777a5a92e9b2.js b/main/static.files/src-script-e66d777a5a92e9b2.js new file mode 100644 index 00000000..d0aebb85 --- /dev/null +++ b/main/static.files/src-script-e66d777a5a92e9b2.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/main/static.files/storage-118b08c4c78b968e.js b/main/static.files/storage-118b08c4c78b968e.js new file mode 100644 index 00000000..98189467 --- /dev/null +++ b/main/static.files/storage-118b08c4c78b968e.js @@ -0,0 +1,24 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement) \ No newline at end of file diff --git a/main/static.files/storage-59fd9b8ccb335783.js b/main/static.files/storage-59fd9b8ccb335783.js deleted file mode 100644 index ca5481ac..00000000 --- a/main/static.files/storage-59fd9b8ccb335783.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func,reversed){if(arr&&arr.length>0){if(reversed){for(let i=arr.length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}let newHref;if(newThemeName==="light"||newThemeName==="dark"||newThemeName==="ayu"){newHref=getVar("static-root-path")+getVar("theme-"+newThemeName+"-css")}else{newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css"}if(!window.currentTheme){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"source-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}}) \ No newline at end of file diff --git a/main/static.files/wheel-7b819b6101059cd0.svg b/main/static.files/wheel-7b819b6101059cd0.svg deleted file mode 100644 index 83c07f63..00000000 --- a/main/static.files/wheel-7b819b6101059cd0.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/main/trait.impl/core/clone/trait.Clone.js b/main/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 00000000..3bf417cd --- /dev/null +++ b/main/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Clone for Compatibility"],["impl Clone for Kind"],["impl Clone for Float"],["impl Clone for Integer"],["impl Clone for UnknownSpecial"],["impl Clone for Config"],["impl Clone for OwnedValue"],["impl<'a> Clone 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/trait.impl/core/cmp/trait.Eq.js b/main/trait.impl/core/cmp/trait.Eq.js new file mode 100644 index 00000000..7e88271b --- /dev/null +++ b/main/trait.impl/core/cmp/trait.Eq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Eq for Compatibility"],["impl Eq for Kind"],["impl Eq for Integer"],["impl Eq for UnknownSpecial"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/cmp/trait.PartialEq.js b/main/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 00000000..f21cba9d --- /dev/null +++ b/main/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl PartialEq for Compatibility"],["impl PartialEq for ValueError"],["impl PartialEq for Kind"],["impl PartialEq for Float"],["impl PartialEq for Integer"],["impl PartialEq for UnknownSpecial"],["impl PartialEq for OwnedValue"],["impl<'a, 'b> PartialEq<Value<'b>> 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/trait.impl/core/convert/trait.From.js b/main/trait.impl/core/convert/trait.From.js new file mode 100644 index 00000000..73408d71 --- /dev/null +++ b/main/trait.impl/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl From<f32> for Float"],["impl From<f64> for Float"],["impl From<i128> for Integer"],["impl From<i16> for Integer"],["impl From<i32> for Integer"],["impl From<i64> for Integer"],["impl From<i8> for Integer"],["impl From<u128> for Integer"],["impl From<u16> for Integer"],["impl From<u32> for Integer"],["impl From<u64> for Integer"],["impl From<u8> for Integer"],["impl From<FromUtf8Error> for Error"],["impl From<Utf8Error> for Error"],["impl From<Error> for Error"],["impl From<UnknownSpecial> for Error"],["impl<'a> From<&'a Value<'a>> for OwnedValue"],["impl<'a> From<&'a str> for Value<'a>"],["impl<'a> From<&'a [u8]> for Value<'a>"],["impl<'a> From<&'a [u8]> for SliceReader<'a>"],["impl<'a> From<Option<Value<'a>>> for Value<'a>"],["impl<'a> From<Value<'a>> for OwnedValue"],["impl<'a> From<bool> for Value<'a>"],["impl<'a> From<f32> for Value<'a>"],["impl<'a> From<f64> for Value<'a>"],["impl<'a> From<i128> for Value<'a>"],["impl<'a> From<i16> for Value<'a>"],["impl<'a> From<i32> for Value<'a>"],["impl<'a> From<i64> for Value<'a>"],["impl<'a> From<i8> for Value<'a>"],["impl<'a> From<u128> for Value<'a>"],["impl<'a> From<u16> for Value<'a>"],["impl<'a> From<u32> for Value<'a>"],["impl<'a> From<u64> for Value<'a>"],["impl<'a> From<u8> for Value<'a>"],["impl<'a> From<()> for Value<'a>"],["impl<'a> From<String> for Value<'a>"],["impl<'a> From<Vec<(Value<'a>, Value<'a>)>> for Value<'a>"],["impl<'a> From<Vec<Value<'a>>> for Value<'a>"],["impl<'a> From<Vec<u8>> for Value<'a>"],["impl<'a> From<SliceReader<'a>> for &'a [u8]"],["impl<'a, const N: usize> From<&'a [u8; N]> 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.TryFrom.js b/main/trait.impl/core/convert/trait.TryFrom.js similarity index 76% rename from main/implementors/core/convert/trait.TryFrom.js rename to main/trait.impl/core/convert/trait.TryFrom.js index ab551320..ae888aa0 100644 --- a/main/implementors/core/convert/trait.TryFrom.js +++ b/main/trait.impl/core/convert/trait.TryFrom.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl TryFrom<u64> for Special"]] +"pot":[["impl TryFrom<u64> for Special"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/default/trait.Default.js b/main/trait.impl/core/default/trait.Default.js new file mode 100644 index 00000000..8ad04b13 --- /dev/null +++ b/main/trait.impl/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Default for Compatibility"],["impl Default for SymbolList<'_>"],["impl Default for SymbolMap"],["impl Default 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/trait.impl/core/error/trait.Error.js b/main/trait.impl/core/error/trait.Error.js new file mode 100644 index 00000000..46401213 --- /dev/null +++ b/main/trait.impl/core/error/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Error for Error"],["impl Error for ValueError"],["impl Error for SymbolMapPopulationError"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/fmt/trait.Debug.js b/main/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 00000000..9c005337 --- /dev/null +++ b/main/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Debug for Compatibility"],["impl Debug for Error"],["impl Debug for ValueError"],["impl Debug for Kind"],["impl Debug for Special"],["impl Debug for Float"],["impl Debug for Integer"],["impl Debug for UnknownSpecial"],["impl Debug for SymbolMap"],["impl Debug for SymbolMapPopulationError"],["impl Debug for Config"],["impl Debug for OwnedValue"],["impl<'a> Debug for Value<'a>"],["impl<'a> Debug for SliceReader<'a>"],["impl<'a, 'de> Debug for SymbolMapRef<'a, 'de>"],["impl<'a, W: WriteBytesExt> Debug for Serializer<'a, W>"],["impl<'de> Debug for Nucleus<'de>"],["impl<'de> Debug for BufferedBytes<'de>"],["impl<'de> Debug for SymbolList<'de>"],["impl<'de> Debug for Atom<'de>"],["impl<'s, 'de, R: Reader<'de>> Debug for 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/trait.impl/core/fmt/trait.Display.js b/main/trait.impl/core/fmt/trait.Display.js new file mode 100644 index 00000000..44ca7c83 --- /dev/null +++ b/main/trait.impl/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Display for Error"],["impl Display for ValueError"],["impl Display for Float"],["impl Display for Integer"],["impl Display for UnknownSpecial"],["impl Display for SymbolMapPopulationError"],["impl<'a> Display 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/trait.impl/core/iter/traits/collect/trait.FromIterator.js b/main/trait.impl/core/iter/traits/collect/trait.FromIterator.js new file mode 100644 index 00000000..5dc0cfbc --- /dev/null +++ b/main/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl<'a, A> FromIterator<A> for Value<'a>
where\n A: Into<Value<'a>>,
"],["impl<'a, K, V> FromIterator<(K, V)> for Value<'a>
where\n K: Into<Value<'a>>,\n V: Into<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/iter/traits/double_ended/trait.DoubleEndedIterator.js b/main/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js similarity index 87% rename from main/implementors/core/iter/traits/double_ended/trait.DoubleEndedIterator.js rename to main/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js index 025c5979..bbc5d207 100644 --- a/main/implementors/core/iter/traits/double_ended/trait.DoubleEndedIterator.js +++ b/main/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'a> DoubleEndedIterator for ValueIter<'a>"]] +"pot":[["impl<'a> DoubleEndedIterator for ValueIter<'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/iter/traits/exact_size/trait.ExactSizeIterator.js b/main/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js similarity index 87% rename from main/implementors/core/iter/traits/exact_size/trait.ExactSizeIterator.js rename to main/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js index 990c45da..522b3ed6 100644 --- a/main/implementors/core/iter/traits/exact_size/trait.ExactSizeIterator.js +++ b/main/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'a> ExactSizeIterator for ValueIter<'a>"]] +"pot":[["impl<'a> ExactSizeIterator for ValueIter<'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/iter/traits/iterator/trait.Iterator.js b/main/trait.impl/core/iter/traits/iterator/trait.Iterator.js similarity index 86% rename from main/implementors/core/iter/traits/iterator/trait.Iterator.js rename to main/trait.impl/core/iter/traits/iterator/trait.Iterator.js index 9a4451ca..2f9eaf3f 100644 --- a/main/implementors/core/iter/traits/iterator/trait.Iterator.js +++ b/main/trait.impl/core/iter/traits/iterator/trait.Iterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'a> Iterator for ValueIter<'a>"]] +"pot":[["impl<'a> Iterator for ValueIter<'a>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/marker/trait.Copy.js b/main/trait.impl/core/marker/trait.Copy.js new file mode 100644 index 00000000..a741cf53 --- /dev/null +++ b/main/trait.impl/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Copy for Compatibility"],["impl Copy for Kind"],["impl Copy for Float"],["impl Copy for Integer"],["impl Copy for UnknownSpecial"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/marker/trait.Freeze.js b/main/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 00000000..f039b526 --- /dev/null +++ b/main/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"pot":[["impl Freeze for Compatibility",1,["pot::Compatibility"]],["impl Freeze for Error",1,["pot::error::Error"]],["impl Freeze for ValueError",1,["pot::value::ValueError"]],["impl Freeze for Kind",1,["pot::format::Kind"]],["impl Freeze for Special",1,["pot::format::Special"]],["impl Freeze for Float",1,["pot::format::Float"]],["impl Freeze for Integer",1,["pot::format::Integer"]],["impl Freeze for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl Freeze for SymbolMap",1,["pot::ser::SymbolMap"]],["impl Freeze for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl Freeze for Config",1,["pot::Config"]],["impl Freeze for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> Freeze for Value<'a>",1,["pot::value::Value"]],["impl<'a> Freeze for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<'a> Freeze for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl<'a, 'de> Freeze for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'a, W> Freeze for Serializer<'a, W>
where\n W: Freeze,
",1,["pot::ser::Serializer"]],["impl<'de> Freeze for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> Freeze for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'de> Freeze for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de> Freeze for Atom<'de>",1,["pot::format::Atom"]],["impl<'de, 'a, W> Freeze for MapSerializer<'de, 'a, W>",1,["pot::ser::MapSerializer"]],["impl<'de, 'ephemeral> Freeze for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl<'s, 'de, R> Freeze for Deserializer<'s, 'de, R>
where\n R: Freeze,
",1,["pot::de::Deserializer"]],["impl<R> Freeze for IoReader<R>
where\n R: Freeze,
",1,["pot::reader::IoReader"]]], +"xtask":[["impl Freeze for Config",1,["xtask::Config"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/marker/trait.Send.js b/main/trait.impl/core/marker/trait.Send.js new file mode 100644 index 00000000..9eb0d76c --- /dev/null +++ b/main/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"pot":[["impl Send for Compatibility",1,["pot::Compatibility"]],["impl Send for Error",1,["pot::error::Error"]],["impl Send for ValueError",1,["pot::value::ValueError"]],["impl Send for Kind",1,["pot::format::Kind"]],["impl Send for Special",1,["pot::format::Special"]],["impl Send for Float",1,["pot::format::Float"]],["impl Send for Integer",1,["pot::format::Integer"]],["impl Send for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl Send for SymbolMap",1,["pot::ser::SymbolMap"]],["impl Send for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl Send for Config",1,["pot::Config"]],["impl Send for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> Send for Value<'a>",1,["pot::value::Value"]],["impl<'a> Send for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<'a> Send for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl<'a, 'de> Send for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'a, W> Send for Serializer<'a, W>
where\n W: Send,
",1,["pot::ser::Serializer"]],["impl<'de> Send for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> Send for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'de> Send for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de> Send for Atom<'de>",1,["pot::format::Atom"]],["impl<'de, 'a, W> Send for MapSerializer<'de, 'a, W>
where\n W: Send,
",1,["pot::ser::MapSerializer"]],["impl<'de, 'ephemeral> Send for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl<'s, 'de, R> Send for Deserializer<'s, 'de, R>
where\n R: Send,
",1,["pot::de::Deserializer"]],["impl<R> Send for IoReader<R>
where\n R: Send,
",1,["pot::reader::IoReader"]]], +"xtask":[["impl Send for Config",1,["xtask::Config"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/marker/trait.StructuralPartialEq.js b/main/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 00000000..7b68ce32 --- /dev/null +++ b/main/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl StructuralPartialEq for Compatibility"],["impl StructuralPartialEq for ValueError"],["impl StructuralPartialEq for Kind"],["impl StructuralPartialEq for Float"],["impl StructuralPartialEq for Integer"],["impl StructuralPartialEq for UnknownSpecial"],["impl StructuralPartialEq for OwnedValue"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/marker/trait.Sync.js b/main/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 00000000..d205e6a0 --- /dev/null +++ b/main/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"pot":[["impl Sync for Compatibility",1,["pot::Compatibility"]],["impl Sync for Error",1,["pot::error::Error"]],["impl Sync for ValueError",1,["pot::value::ValueError"]],["impl Sync for Kind",1,["pot::format::Kind"]],["impl Sync for Special",1,["pot::format::Special"]],["impl Sync for Float",1,["pot::format::Float"]],["impl Sync for Integer",1,["pot::format::Integer"]],["impl Sync for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl Sync for SymbolMap",1,["pot::ser::SymbolMap"]],["impl Sync for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl Sync for Config",1,["pot::Config"]],["impl Sync for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> Sync for Value<'a>",1,["pot::value::Value"]],["impl<'a> Sync for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<'a> Sync for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl<'a, 'de> Sync for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'a, W> Sync for Serializer<'a, W>
where\n W: Sync,
",1,["pot::ser::Serializer"]],["impl<'de> Sync for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> Sync for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'de> Sync for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de> Sync for Atom<'de>",1,["pot::format::Atom"]],["impl<'de, 'a, W> Sync for MapSerializer<'de, 'a, W>
where\n W: Sync,
",1,["pot::ser::MapSerializer"]],["impl<'de, 'ephemeral> Sync for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl<'s, 'de, R> Sync for Deserializer<'s, 'de, R>
where\n R: Sync,
",1,["pot::de::Deserializer"]],["impl<R> Sync for IoReader<R>
where\n R: Sync,
",1,["pot::reader::IoReader"]]], +"xtask":[["impl Sync for Config",1,["xtask::Config"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/marker/trait.Unpin.js b/main/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 00000000..f61173f9 --- /dev/null +++ b/main/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"pot":[["impl Unpin for Compatibility",1,["pot::Compatibility"]],["impl Unpin for Error",1,["pot::error::Error"]],["impl Unpin for ValueError",1,["pot::value::ValueError"]],["impl Unpin for Kind",1,["pot::format::Kind"]],["impl Unpin for Special",1,["pot::format::Special"]],["impl Unpin for Float",1,["pot::format::Float"]],["impl Unpin for Integer",1,["pot::format::Integer"]],["impl Unpin for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl Unpin for SymbolMap",1,["pot::ser::SymbolMap"]],["impl Unpin for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl Unpin for Config",1,["pot::Config"]],["impl Unpin for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> Unpin for Value<'a>",1,["pot::value::Value"]],["impl<'a> Unpin for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<'a> Unpin for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl<'a, 'de> Unpin for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'a, W> Unpin for Serializer<'a, W>
where\n W: Unpin,
",1,["pot::ser::Serializer"]],["impl<'de> Unpin for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> Unpin for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'de> Unpin for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de> Unpin for Atom<'de>",1,["pot::format::Atom"]],["impl<'de, 'a, W> Unpin for MapSerializer<'de, 'a, W>",1,["pot::ser::MapSerializer"]],["impl<'de, 'ephemeral> Unpin for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl<'s, 'de, R> Unpin for Deserializer<'s, 'de, R>
where\n R: Unpin,
",1,["pot::de::Deserializer"]],["impl<R> Unpin for IoReader<R>
where\n R: Unpin,
",1,["pot::reader::IoReader"]]], +"xtask":[["impl Unpin for Config",1,["xtask::Config"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/ops/deref/trait.Deref.js b/main/trait.impl/core/ops/deref/trait.Deref.js new file mode 100644 index 00000000..304d490b --- /dev/null +++ b/main/trait.impl/core/ops/deref/trait.Deref.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Deref for SymbolStr<'_, '_>"],["impl Deref for OwnedValue"]] +};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/ops/deref/trait.DerefMut.js b/main/trait.impl/core/ops/deref/trait.DerefMut.js similarity index 85% rename from main/implementors/core/ops/deref/trait.DerefMut.js rename to main/trait.impl/core/ops/deref/trait.DerefMut.js index 6e678415..32ab7751 100644 --- a/main/implementors/core/ops/deref/trait.DerefMut.js +++ b/main/trait.impl/core/ops/deref/trait.DerefMut.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl DerefMut for OwnedValue"]] +"pot":[["impl DerefMut for OwnedValue"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/main/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 00000000..4eb7964e --- /dev/null +++ b/main/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"pot":[["impl !RefUnwindSafe for Error",1,["pot::error::Error"]],["impl RefUnwindSafe for Compatibility",1,["pot::Compatibility"]],["impl RefUnwindSafe for ValueError",1,["pot::value::ValueError"]],["impl RefUnwindSafe for Kind",1,["pot::format::Kind"]],["impl RefUnwindSafe for Special",1,["pot::format::Special"]],["impl RefUnwindSafe for Float",1,["pot::format::Float"]],["impl RefUnwindSafe for Integer",1,["pot::format::Integer"]],["impl RefUnwindSafe for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl RefUnwindSafe for SymbolMap",1,["pot::ser::SymbolMap"]],["impl RefUnwindSafe for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl RefUnwindSafe for Config",1,["pot::Config"]],["impl RefUnwindSafe for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> RefUnwindSafe for Value<'a>",1,["pot::value::Value"]],["impl<'a> RefUnwindSafe for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<'a> RefUnwindSafe for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl<'a, 'de> RefUnwindSafe for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'a, W> RefUnwindSafe for Serializer<'a, W>
where\n W: RefUnwindSafe,
",1,["pot::ser::Serializer"]],["impl<'de> RefUnwindSafe for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> RefUnwindSafe for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'de> RefUnwindSafe for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de> RefUnwindSafe for Atom<'de>",1,["pot::format::Atom"]],["impl<'de, 'a, W> RefUnwindSafe for MapSerializer<'de, 'a, W>
where\n W: RefUnwindSafe,
",1,["pot::ser::MapSerializer"]],["impl<'de, 'ephemeral> RefUnwindSafe for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl<'s, 'de, R> RefUnwindSafe for Deserializer<'s, 'de, R>
where\n R: RefUnwindSafe,
",1,["pot::de::Deserializer"]],["impl<R> RefUnwindSafe for IoReader<R>
where\n R: RefUnwindSafe,
",1,["pot::reader::IoReader"]]], +"xtask":[["impl RefUnwindSafe for Config",1,["xtask::Config"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/main/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 00000000..9f48a66d --- /dev/null +++ b/main/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"pot":[["impl !UnwindSafe for Error",1,["pot::error::Error"]],["impl UnwindSafe for Compatibility",1,["pot::Compatibility"]],["impl UnwindSafe for ValueError",1,["pot::value::ValueError"]],["impl UnwindSafe for Kind",1,["pot::format::Kind"]],["impl UnwindSafe for Special",1,["pot::format::Special"]],["impl UnwindSafe for Float",1,["pot::format::Float"]],["impl UnwindSafe for Integer",1,["pot::format::Integer"]],["impl UnwindSafe for UnknownSpecial",1,["pot::format::UnknownSpecial"]],["impl UnwindSafe for SymbolMap",1,["pot::ser::SymbolMap"]],["impl UnwindSafe for SymbolMapPopulationError",1,["pot::ser::SymbolMapPopulationError"]],["impl UnwindSafe for Config",1,["pot::Config"]],["impl UnwindSafe for OwnedValue",1,["pot::value::OwnedValue"]],["impl<'a> UnwindSafe for Value<'a>",1,["pot::value::Value"]],["impl<'a> UnwindSafe for SliceReader<'a>",1,["pot::reader::SliceReader"]],["impl<'a> UnwindSafe for ValueIter<'a>",1,["pot::value::ValueIter"]],["impl<'a, 'de> !UnwindSafe for SymbolMapRef<'a, 'de>",1,["pot::de::SymbolMapRef"]],["impl<'a, W> !UnwindSafe for Serializer<'a, W>",1,["pot::ser::Serializer"]],["impl<'de> UnwindSafe for Nucleus<'de>",1,["pot::format::Nucleus"]],["impl<'de> UnwindSafe for BufferedBytes<'de>",1,["pot::reader::BufferedBytes"]],["impl<'de> UnwindSafe for SymbolList<'de>",1,["pot::de::SymbolList"]],["impl<'de> UnwindSafe for Atom<'de>",1,["pot::format::Atom"]],["impl<'de, 'a, W> !UnwindSafe for MapSerializer<'de, 'a, W>",1,["pot::ser::MapSerializer"]],["impl<'de, 'ephemeral> UnwindSafe for SymbolStr<'de, 'ephemeral>",1,["pot::de::SymbolStr"]],["impl<'s, 'de, R> !UnwindSafe for Deserializer<'s, 'de, R>",1,["pot::de::Deserializer"]],["impl<R> UnwindSafe for IoReader<R>
where\n R: UnwindSafe,
",1,["pot::reader::IoReader"]]], +"xtask":[["impl UnwindSafe for Config",1,["xtask::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/khonsu_tools/publish/trait.Config.js b/main/trait.impl/khonsu_tools/publish/trait.Config.js similarity index 100% rename from main/implementors/khonsu_tools/publish/trait.Config.js rename to main/trait.impl/khonsu_tools/publish/trait.Config.js diff --git a/main/implementors/khonsu_tools/trait.Config.js b/main/trait.impl/khonsu_tools/trait.Config.js similarity index 100% rename from main/implementors/khonsu_tools/trait.Config.js rename to main/trait.impl/khonsu_tools/trait.Config.js diff --git a/main/implementors/pot/reader/trait.Reader.js b/main/trait.impl/pot/reader/trait.Reader.js similarity index 100% rename from main/implementors/pot/reader/trait.Reader.js rename to main/trait.impl/pot/reader/trait.Reader.js diff --git a/main/implementors/serde/de/trait.Deserialize.js b/main/trait.impl/serde/de/trait.Deserialize.js similarity index 80% rename from main/implementors/serde/de/trait.Deserialize.js rename to main/trait.impl/serde/de/trait.Deserialize.js index 33a5714f..528069ac 100644 --- a/main/implementors/serde/de/trait.Deserialize.js +++ b/main/trait.impl/serde/de/trait.Deserialize.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"pot":[["impl<'de> Deserialize<'de> for SymbolMap"],["impl<'de> Deserialize<'de> for OwnedValue"],["impl<'de> Deserialize<'de> for SymbolMap"],["impl<'de: 'a, 'a> Deserialize<'de> for Value<'a>"]] +"pot":[["impl<'de> Deserialize<'de> for SymbolMap"],["impl<'de> Deserialize<'de> for OwnedValue"],["impl<'de> Deserialize<'de> for SymbolMap"],["impl<'de: 'a, 'a> Deserialize<'de> 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.Deserializer.js b/main/trait.impl/serde/de/trait.Deserializer.js similarity index 89% rename from main/implementors/serde/de/trait.Deserializer.js rename to main/trait.impl/serde/de/trait.Deserializer.js index 88aca049..b73a16ee 100644 --- a/main/implementors/serde/de/trait.Deserializer.js +++ b/main/trait.impl/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/trait.impl/serde/de/trait.EnumAccess.js similarity index 89% rename from main/implementors/serde/de/trait.EnumAccess.js rename to main/trait.impl/serde/de/trait.EnumAccess.js index f2f0be1f..a64a0fc1 100644 --- a/main/implementors/serde/de/trait.EnumAccess.js +++ b/main/trait.impl/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/trait.impl/serde/de/trait.Error.js b/main/trait.impl/serde/de/trait.Error.js new file mode 100644 index 00000000..3ab22cc6 --- /dev/null +++ b/main/trait.impl/serde/de/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"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/de/trait.VariantAccess.js b/main/trait.impl/serde/de/trait.VariantAccess.js similarity index 89% rename from main/implementors/serde/de/trait.VariantAccess.js rename to main/trait.impl/serde/de/trait.VariantAccess.js index 7cfc2ee7..1147167e 100644 --- a/main/implementors/serde/de/trait.VariantAccess.js +++ b/main/trait.impl/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/trait.impl/serde/ser/trait.Error.js b/main/trait.impl/serde/ser/trait.Error.js new file mode 100644 index 00000000..5de0d19b --- /dev/null +++ b/main/trait.impl/serde/ser/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Error for Error"],["impl Error for ValueError"],["impl Error for SymbolMapPopulationError"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/main/trait.impl/serde/ser/trait.Serialize.js b/main/trait.impl/serde/ser/trait.Serialize.js new file mode 100644 index 00000000..a712535b --- /dev/null +++ b/main/trait.impl/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"pot":[["impl Serialize for SymbolMap"],["impl Serialize for OwnedValue"],["impl Serialize for SymbolMap"],["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/trait.impl/serde/ser/trait.SerializeMap.js similarity index 87% rename from main/implementors/serde/ser/trait.SerializeMap.js rename to main/trait.impl/serde/ser/trait.SerializeMap.js index 28eddf8b..7e4bec28 100644 --- a/main/implementors/serde/ser/trait.SerializeMap.js +++ b/main/trait.impl/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/trait.impl/serde/ser/trait.SerializeSeq.js similarity index 87% rename from main/implementors/serde/ser/trait.SerializeSeq.js rename to main/trait.impl/serde/ser/trait.SerializeSeq.js index feb85e5a..518a4b8d 100644 --- a/main/implementors/serde/ser/trait.SerializeSeq.js +++ b/main/trait.impl/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/trait.impl/serde/ser/trait.SerializeStruct.js similarity index 87% rename from main/implementors/serde/ser/trait.SerializeStruct.js rename to main/trait.impl/serde/ser/trait.SerializeStruct.js index 3c666253..7f1b28b7 100644 --- a/main/implementors/serde/ser/trait.SerializeStruct.js +++ b/main/trait.impl/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/trait.impl/serde/ser/trait.SerializeStructVariant.js similarity index 88% rename from main/implementors/serde/ser/trait.SerializeStructVariant.js rename to main/trait.impl/serde/ser/trait.SerializeStructVariant.js index edbf46c6..a68eea3d 100644 --- a/main/implementors/serde/ser/trait.SerializeStructVariant.js +++ b/main/trait.impl/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/trait.impl/serde/ser/trait.SerializeTuple.js similarity index 87% rename from main/implementors/serde/ser/trait.SerializeTuple.js rename to main/trait.impl/serde/ser/trait.SerializeTuple.js index c7bf32d1..0209b3a4 100644 --- a/main/implementors/serde/ser/trait.SerializeTuple.js +++ b/main/trait.impl/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/trait.impl/serde/ser/trait.SerializeTupleStruct.js similarity index 88% rename from main/implementors/serde/ser/trait.SerializeTupleStruct.js rename to main/trait.impl/serde/ser/trait.SerializeTupleStruct.js index 729e16d8..c5bbe912 100644 --- a/main/implementors/serde/ser/trait.SerializeTupleStruct.js +++ b/main/trait.impl/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/trait.impl/serde/ser/trait.SerializeTupleVariant.js similarity index 88% rename from main/implementors/serde/ser/trait.SerializeTupleVariant.js rename to main/trait.impl/serde/ser/trait.SerializeTupleVariant.js index cae996da..ab5ef075 100644 --- a/main/implementors/serde/ser/trait.SerializeTupleVariant.js +++ b/main/trait.impl/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/trait.impl/serde/ser/trait.Serializer.js similarity index 87% rename from main/implementors/serde/ser/trait.Serializer.js rename to main/trait.impl/serde/ser/trait.Serializer.js index f104a69a..73411b79 100644 --- a/main/implementors/serde/ser/trait.Serializer.js +++ b/main/trait.impl/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/trait.impl/std/io/trait.Read.js b/main/trait.impl/std/io/trait.Read.js new file mode 100644 index 00000000..aa24eee7 --- /dev/null +++ b/main/trait.impl/std/io/trait.Read.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"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/type.impl/core/result/enum.Result.js b/main/type.impl/core/result/enum.Result.js new file mode 100644 index 00000000..73bf480b --- /dev/null +++ b/main/type.impl/core/result/enum.Result.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"pot":[["
1.0.0 · source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","pot::Result"],["
1.0.0 · source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

source§

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

Formats the value using the given formatter. Read more
","Debug","pot::Result"],["
source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","pot::Result"],["
source§

impl From<&StreamResult> for Result<MZStatus, MZError>

source§

fn from(res: &StreamResult) -> Result<MZStatus, MZError>

Converts to this type from the input type.
","From<&StreamResult>","pot::Result"],["
source§

impl From<StreamResult> for Result<MZStatus, MZError>

source§

fn from(res: StreamResult) -> Result<MZStatus, MZError>

Converts to this type from the input type.
","From","pot::Result"],["
1.0.0 · source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","pot::Result"],["
source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","pot::Result"],["
source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","pot::Result"],["
1.0.0 · source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","pot::Result"],["
1.0.0 · source§

impl<T, E> IntoIterator for Result<T, E>

source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","pot::Result"],["
1.0.0 · source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","pot::Result"],["
1.0.0 · source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

source§

fn eq(&self, other: &Result<T, E>) -> bool

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

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

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","pot::Result"],["
1.0.0 · source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","pot::Result"],["
1.16.0 · source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
§Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","pot::Result"],["
source§

impl<T, E> Residual<T> for Result<Infallible, E>

§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","pot::Result"],["
source§

impl<T, E> Result<&T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"pot::Result"],["
source§

impl<T, E> Result<&mut T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
§Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"pot::Result"],["
source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: unstable) · source

pub fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
§Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"pot::Result"],["
source§

impl<T, E> Result<Result<T, E>, E>

source

pub fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
§Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"pot::Result"],["
source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
§Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
§Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: unstable) · source

pub fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
§Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
§Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
§Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
§Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls a function with a reference to the contained value if Ok.

\n

Returns the original result.

\n
§Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls a function with a reference to the contained value if Err.

\n

Returns the original result.

\n
§Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
§Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
§Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
§Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
§Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
§Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
§Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
§Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
§Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
§Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
§Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
§Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
§Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
§Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
§Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
§Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
§Safety
\n

Calling this method on an Err is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
§Safety
\n

Calling this method on an Ok is undefined behavior.

\n
§Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"pot::Result"],["
source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

source§

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

Serialize this value into the given Serde serializer. Read more
","Serialize","pot::Result"],["
1.16.0 · source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
§Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","pot::Result"],["
1.61.0 · source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","pot::Result"],["
source§

impl<T, E> Try for Result<T, E>

§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
source§

fn branch(\n self,\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","pot::Result"],["
1.0.0 · source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","pot::Result"],["
1.0.0 · source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","pot::Result"],["
1.0.0 · source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","pot::Result"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/main/type.impl/pot/de/struct.SymbolList.js b/main/type.impl/pot/de/struct.SymbolList.js new file mode 100644 index 00000000..28175613 --- /dev/null +++ b/main/type.impl/pot/de/struct.SymbolList.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"pot":[["
source§

impl<'de> Debug for SymbolList<'de>

source§

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

Formats the value using the given formatter. Read more
","Debug","pot::de::SymbolMap"],["
source§

impl Default for SymbolList<'_>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
","Default","pot::de::SymbolMap"],["
source§

impl<'de> SymbolList<'de>

source

pub const fn new() -> Self

Returns a new, empty symbol list.

\n
source

pub fn push_borrowed(&mut self, borrowed: &'de str)

Push a symbol that has been borrowed from the deserialization source.

\n
source

pub fn push(&mut self, ephemeral: &str)

Push a symbol that cannot be borrowed from the deserialization source.

\n
source

pub fn get(&self, index: usize) -> Option<SymbolStr<'de, '_>>

Return the symbol stored at index, or None if index is out of\nbounds.

\n
source

pub fn len(&self) -> usize

Returns the number of entries in the symbol list.

\n
source

pub fn is_empty(&self) -> bool

Returns true if there are no symbols in this list.

\n
",0,"pot::de::SymbolMap"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/main/xtask/all.html b/main/xtask/all.html index bd491ffe..0d8664c0 100644 --- a/main/xtask/all.html +++ b/main/xtask/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Enums

Functions

\ No newline at end of file +List of all items in this crate

List of all items

Enums

Functions

\ No newline at end of file diff --git a/main/xtask/enum.Config.html b/main/xtask/enum.Config.html index 7e0991c9..f7d0f2b9 100644 --- a/main/xtask/enum.Config.html +++ b/main/xtask/enum.Config.html @@ -1,11 +1,11 @@ -Config in xtask - Rust

Enum xtask::Config

source ·
pub(crate) enum Config {}

Trait Implementations§

source§

impl Config for Config

§

type Publish = Config

§

type Universal = DefaultConfig

source§

impl Config for Config

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.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+Config in xtask - Rust

Enum xtask::Config

source ·
pub(crate) enum Config {}

Trait Implementations§

source§

impl Config for Config

§

type Publish = Config

§

type Universal = DefaultConfig

source§

impl Config for Config

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + 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.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - 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.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + 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.
\ No newline at end of file diff --git a/main/xtask/fn.main.html b/main/xtask/fn.main.html index 4fef1b62..dfbdd180 100644 --- a/main/xtask/fn.main.html +++ b/main/xtask/fn.main.html @@ -1 +1 @@ -main in xtask - Rust

Function xtask::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file +main in xtask - Rust

Function xtask::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file diff --git a/main/xtask/index.html b/main/xtask/index.html index 841cfc3f..dd453a13 100644 --- a/main/xtask/index.html +++ b/main/xtask/index.html @@ -1 +1 @@ -xtask - Rust

Crate xtask

source ·

Enums

Functions

\ No newline at end of file +xtask - Rust

Crate xtask

source ·

Enums§

Functions§

\ No newline at end of file