Crate erased_cells

Crate erased_cells 

Source
Expand description

Encoding and manipulation of runtime-dynamic cell values.

§Synopsis

This crate enables the manipulation of heterogeneous values and buffers of Rust primitive numeric types. It is useful in cases where the numeric encoding is either not known at compile-time, or when multiple encodings are in use yet need to be treated in a homogenous way. The types are normalized using discriminated unions (enums).

There are three core enums:

  • CellType: An enumeration of each supported primitive type.
  • CellValue: A scalar primitive value stored as a CellType associated variant.
  • CellBuffer: A Vec<_> of primitive values stored as a CellType associated variant.

When the masked feature is enabled (the default) three additional constructs are available:

§Examples

Usage examples:

§Feature Flags

The following feature flags are available.

NameDescriptionDefault
maskedEnable the MaskedCellBuffer APItrue
serdeDerive serde traits for core typestrue

Modules§

error
Crate-wide Result/Error types.

Macros§

with_ct
A callback style macro used to construct various implementations covering all CellTypes.

Structs§

CellBufferIterator
Iterator over CellValue elements in a CellBuffer.
Mask
Encodes the bit-mask for MaskedCellBuffer
MaskedCellBuffer
A CellBuffer with a companion Mask.
MaskedCellBufferIterator
Iterator over (CellValue, bool) elements in a MaskedCellBuffer.

Enums§

CellBuffer
An enum over buffers of CellEncoding types.
CellType
Cell-type variants
CellValue
Value variants for each CellType
NoData
Encodes a no-data value for cells that should be considered invalid or masked-out of a result.

Traits§

BufferOps
Operations common to buffers of CellValues.
CellEncoding
Trait for marking Rust primitives as having a corresponding CellType.
IsNodata
Trait for no-data testing.