Module ion_rs::types

source ·
Expand description

This module provides an implementation of the data types described by the Ion Data Model section of the Ion 1.0 spec.

Structs

  • An in-memory representation of an Ion blob.
  • An owned, immutable byte array.
  • An in-memory representation of an Ion clob.
  • A signed integer that can be used as the coefficient of a Decimal value. This type does not consider 0 and -0 to be equal and supports magnitudes of arbitrary size.
  • Allows the user to set the day field on a builder that has already had its year and month fields set. Or, if Month is the desired precision, they may build the Timestamp with an unknown offset instead.
  • An arbitrary-precision Decimal type with a distinct representation of negative zero (-0).
  • Allows the user to set the fractional_seconds field on a builder that has already had its year, month, day, hour, minute, and second fields set. Or, if Second is the desired precision, they may build the Timestamp instead, optionally specifying an offset if known.
  • Allows the user to set the hour and minute fields on a builder that has already had its year, month, and day fields set. Or, if Day is the desired precision, they may build the Timestamp with an unknown offset instead.
  • An in-memory representation of an Ion list.
  • Allows the user to set the month field on a builder that has already had its year field set. Or, if Year is the desired precision, they may build the Timestamp with an unknown offset instead.
  • An in-memory representation of an Ion s-expression
  • Allows the user to set the second field on a builder that has already had its year, month, day, hour, and minute fields set. Or, if HourAndMinute is the desired precision, they may build the Timestamp instead, optionally specifying an offset if known.
  • An owned, immutable in-memory representation of an Ion string.
  • An in-memory representation of an Ion Struct
  • The text of a fully resolved field name, annotation, or symbol value. If the symbol has known text (that is: the symbol is not $0), it will be stored as either a String or a shared reference to text in a symbol table.
  • Represents a point in time to a specified degree of precision. Unlike chrono’s NaiveDateTime and DateTime, a Timestamp has variable precision ranging from a year to fractional seconds of an arbitrary unit.

Enums

  • Container for either an integer that can fit in a 64-bit word or an arbitrarily sized BigInt.
  • Represents the Ion data type of a given value. To learn more about each data type, read the Ion Data Model section of the spec.
  • Stores the precision of a Timestamp’s fractional seconds, if present. This type is not self-contained; if the Timestamp has a precision that is less than or equal to nanoseconds (i.e. fewer than 10 digits), the fractional seconds value will be stored in the Timestamp’s NaiveDateTime component and the Mantissa will indicate the number of digits from that value that should be used. If the precision is 10 or more digits, the Mantissa will store the value itself as a Decimal with the correct precision.
  • Indicates the most precise time unit that has been specified in the accompanying Timestamp.
  • Indicates whether the Coefficient’s magnitude is less than 0 (negative) or not (positive). When the magnitude is zero, the Sign can be used to distinguish between -0 and 0.
  • Represents a UInt of any size. Used for reading binary integers and symbol Ids. Used to represent the unsigned magnitude of Decimal values and fractional seconds.

Traits

  • Provides convenient integer accessors for integer values that are like Int

Type Definitions