use serde::de::value::{MapDeserializer, SeqDeserializer}; use serde::de::{
Deserialize, Deserializer, Error, IntoDeserializer, MapAccess, SeqAccess, Visitor,
}; use serde::ser::{Serialize, Serializer};
use core::fmt::{self, Formatter}; use core::hash::{BuildHasher, Hash}; use core::marker::PhantomData; use core::{cmp, mem};
usecrate::{Bucket, IndexMap, IndexSet};
/// Limit our preallocated capacity from a deserializer `size_hint()`. /// /// We do account for the `Bucket` overhead from its saved `hash` field, but we don't count the /// `RawTable` allocation or the fact that its raw capacity will be rounded up to a power of two. /// The "max" is an arbitrary choice anyway, not something that needs precise adherence. /// /// This is based on the internal `serde::de::size_hint::cautious(hint)` function. pub(crate) fn cautious_capacity<K, V>(hint: Option<usize>) -> usize { const MAX_PREALLOC_BYTES: usize = 1024 * 1024;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.