Expand description
Support code for encoding and decoding types.
Re-exportsΒ§
use std::borrow::Cow;πuse std::cell::Cell;πuse std::cell::RefCell;πuse std::collections::BTreeMap;πuse std::collections::BTreeSet;πuse std::collections::HashMap;πuse std::collections::HashSet;πuse std::collections::VecDeque;πuse std::hash::BuildHasher;πuse std::hash::Hash;πuse std::hash::Hash;πuse std::marker::PhantomData;πuse std::marker::PointeeSized;πExperimental use std::num::NonZero;πuse std::num::ZeroablePrimitive;πExperimental use std::path;πuse std::rc::Rc;πuse std::sync::Arc;πuse rustc_hashes::Hash64;πuse rustc_hashes::Hash128;πuse smallvec::Array;πuse smallvec::SmallVec;πuse thin_vec::ThinVec;π
MacrosΒ§
- direct_
serialize_ πimpls - peel π
- tuple π
ConstantsΒ§
- BYTE_
STR_ πSENTINEL - For byte strings there are no bytes that cannot occur. Just use this value
as a best-effort sentinel. There is no validation skipped so the potential
for badness is lower than in the
STR_SENTINELcase. - STR_
SENTINEL π - A byte that cannot occur in UTF8 sequences. Used to mark the end of a string. This way we can skip validation and still be relatively sure that deserialization did not desynchronize.
TraitsΒ§
- Context
Ord - Decodable
- Trait for types that can be deserialized
- Decoder
- This current does not support
f32norf64, as theyβre not needed in any serialized data structures. That could be changed, but consider whether it really makes sense to store floating-point values at all. (If you need it, revert https://github.com/rust-lang/rust/pull/109984.) - Encodable
- Trait for types that can be serialized
- Encoder
- A note about error handling.