Skip to main content

Crate covalence_lib_data

Crate covalence_lib_data 

Source
Expand description

Shared byte buffers and containers.

An internal facade (a crate that re-exports other crates) for Covalence’s own crates. Its API may change without notice.

  • Re-exports bytes, hashbrown, indexmap, smallvec, smol_str and arrayvec, with their main types at the root.
  • Adds the Symbol alias.
  • Bytes::copy_from_slice establishes immutable ownership at an untrusted boundary. Clones and slices share that owned storage.
  • An IndexMap keeps insertion order. That is not canonical CBOR wire ordering.
  • Serialization lives in covalence-lib-serde.

Re-exports§

pub use arrayvec;
pub use bytes;
pub use hashbrown;
pub use indexmap;
pub use smallvec;
pub use smol_str;

Structs§

ArrayString
A string with a fixed capacity.
ArrayVec
A vector with a fixed capacity.
Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
BytesMut
A unique reference to a contiguous slice of memory.
HashTable
Low-level hash table with explicit hashing.
IndexMap
A hash table where the iteration order of the key-value pairs is independent of the hash values of the keys.
IndexSet
A hash set where the iteration order of the values is independent of their hash values.
SmallVec
A Vec-like container that can store a small number of elements inline.
SmolStr
A SmolStr is a string type that has the following properties:

Traits§

Buf
Read bytes from a buffer.
BufMut
A trait for values that provide sequential write access to bytes.

Type Aliases§

Symbol
An owned symbol name, stored inline when short and shared when long.