std - Standard library¶
Modules¶
convert- Type conversionsops- Operatorsoption- Nullable valuesarray- Array functionsmath- Mathematical opstext- Text functionsfs- File system operationssql- SQL interfacedatetimestamptime- Time-of-day helper functions.
anno doc¶
anno doc(const content: Text)
Annotates a definition with documentation.
anno hidden¶
anno hidden()
Annotates a definition to be hidden from documentation.
anno metadata¶
anno metadata(const name: Text)
Annotates a project with metadata.
anno runner¶
anno runner(const url: Text)
Annotates a project with default runner URL.
anno rust_derive¶
anno rust_derive(const macros: [Text])
Annotates a type with traits to #[Derive] when translating to Rust.
type Bool¶
type Bool(Prim8)
A boolean value.
type Int8¶
type Int8(Prim8)
A signed 8-bit integer.
type Int16¶
type Int16(Prim16)
A signed 16-bit integer.
type Int32¶
type Int32(Prim32)
A signed 32-bit integer.
type Int64¶
type Int64(Prim64)
A signed 64-bit integer.
type Uint8¶
type Uint8(Prim8)
An unsigned 8-bit integer.
type Uint16¶
type Uint16(Prim16)
An unsigned 16-bit integer.
type Uint32¶
type Uint32(Prim32)
An unsigned 32-bit integer.
type Uint64¶
type Uint64(Prim64)
An unsigned 64-bit integer.
type Float32¶
type Float32(Prim32)
A 32-bit floating-point number.
type Float64¶
type Float64(Prim64)
A 64-bit floating-point number.
type Text¶
type Text([Prim8])
Unicode text of arbitrary length. Encoded as UTF-8.
type Timestamp¶
type Timestamp(microseconds: Int64)
An instant in time. Timestamp without a timezone.
Backed by a signed 64-bit integer, indicating microseconds since the Unix epoch (1970-01-01T00:00:00.000 UTC), excluding leap seconds.
type Date¶
type Date(days_epoch: Int32)
Elapsed days since Unix Epoch (1970-01-01).
Backed by a signed 32-bit integer, representing number of days.
type Duration¶
type Duration(microseconds: Int64)
A duration of time, unrelated to calendar events. Can be negative.
Backed by a signed 64-bit integer, representing number of microseconds.
type Time¶
type Time(micros_midnight: Uint64)
Time of day, in the range [0, 24h).
Backed by an unsigned 64-bit integer, representing microseconds since midnight.
func timezone_offset¶
func timezone_offset(time_zone: Text, date: Date): Duration
Returns offset of a time zone from UTC on a given date.
type Decimal¶
type Decimal(Prim64)
Exact decimal value with a fixed SCALE, which is the number of digits past
the decimal point.
Currently, SCALE is 2. This will be configurable in the future.
Can hold values from -10**(19-SCALE) to 10**(19-SCALE).