pub struct Decimal128 { /* private fields */ }
Expand description

Represents a decimal value with precision and scale. The decimal value could represented by a signed 128-bit integer.

Implementations

Returns i128 representation of the decimal.

Trait Implementations

The bit-width of the internal representation.

Creates a decimal value from precision, scale, and bytes. Read more

Returns the raw bytes of the integer representation of the decimal.

Returns the precision of the decimal.

Returns the scale of the decimal.

Tries to create a decimal value from precision, scale and bytes. If the length of bytes isn’t same as the bit width of this decimal, returning an error. The bytes should be stored in little-endian order. Read more

Returns the string representation of the decimal. If the string representation cannot be fitted with the precision of the decimal, the string will be truncated. Read more

Return the precision (total digits) that can be stored by this array

Return the scale (digits after the decimal) that can be stored by this array

Returns the element at index i.

Returns the offset for the element at index i. Read more

Returns the length for an element. Read more

Returns a clone of the value data buffer

Build a decimal array from FixedSizeBinaryArray. Read more

👎 Deprecated:

please use from_fixed_size_binary_array instead

Build a decimal array from FixedSizeListArray. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.