substrate-data 0.3.0

One data model, text syntax, binary form, packed frames and schema system — for any program's files, saves and wire messages.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! [`StaticShape`]: a shape found for a slice of static keys.

/// Slots of the cache of shapes of static keys (a power of two).
pub(in crate::wire::binary) const STATIC_SHAPES: usize = 16;

/// A shape found for a static slice of keys and a choice of them.
#[derive(Debug, Clone, Copy, Default)]
pub(in crate::wire::binary) struct StaticShape {
    /// Where the slice is.
    pub(in crate::wire::binary) keys: usize,
    /// Which of the slice's keys the shape has.
    pub(in crate::wire::binary) present: u64,
    /// The shape's number + 1; 0 for a free slot.
    pub(in crate::wire::binary) shape: u32,
}