Skip to content

Rust errors and scalar types

The safe crate exposes explicit error and scalar representations.

Error

rust
pub enum Error

A failed Table operation.

VariantMeaning
InvalidArgumentA pointer, count, coordinate, or finite-value requirement was violated.
InvalidStateA native descriptor was not initialised for the requested operation.
InvalidAxisAn axis was empty, non-finite, unordered, or collided after float32 conversion.
IndexOutOfRangeAn axis or cell index exceeded the table dimensions.
TypeMismatchA value or replacement used a different scalar representation.
DimensionMismatchRust slices did not describe the required curve or map shape.
SizeOverflowMultiplying map dimensions overflowed usize.

Scalar

rust
pub trait Scalar: private::Sealed + Copy + Debug + PartialEq + Send + Sync + 'static

A scalar representation supported by the native Table core.

ScalarType

rust
pub enum ScalarType

A supported scalar storage representation.

VariantMeaning
I8Signed 8-bit integer.
U8Unsigned 8-bit integer.
I16Signed 16-bit integer.
U16Unsigned 16-bit integer.
I32Signed 32-bit integer.
U32Unsigned 32-bit integer.
F32IEEE-754 single-precision floating point.

Released under the MIT Licence.