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 aCellTypeassociated variant.CellBuffer: AVec<_>of primitive values stored as aCellTypeassociated variant.
When the masked feature is enabled (the default) three additional constructs are available:
Mask: A bit array used to store the associated validity of aCellValuewithin aMaskedCellBuffer.MaskedCellBuffer: The combination ofCellBufferandMask.NoData: Specification of a sentinel value for invalid data, used in converting between “Vec<T: CellEncoding>” andMaskedCellBuffer.
§Examples
Usage examples:
§Feature Flags
The following feature flags are available.
| Name | Description | Default |
|---|---|---|
masked | Enable the MaskedCellBuffer API | true |
serde | Derive serde traits for core types | true |
Modules§
- error
- Crate-wide
Result/Errortypes.
Macros§
- with_ct
- A callback style
macro used to construct various implementations covering all
CellTypes.
Structs§
- Cell
Buffer Iterator - Iterator over
CellValueelements in aCellBuffer. - Mask
- Encodes the bit-mask for
MaskedCellBuffer - Masked
Cell Buffer - A
CellBufferwith a companionMask. - Masked
Cell Buffer Iterator - Iterator over (
CellValue,bool) elements in aMaskedCellBuffer.
Enums§
- Cell
Buffer - An enum over buffers of
CellEncodingtypes. - Cell
Type - Cell-type variants
- Cell
Value - 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§
- Buffer
Ops - Operations common to buffers of
CellValues. - Cell
Encoding - Trait for marking Rust primitives as having a corresponding
CellType. - IsNodata
- Trait for no-data testing.