std - Standard library¶
Modules¶
convert- Type conversionsops- Operatorsoption- Nullable valuesarray- Array functionsmath- Mathematical opstext- Text functionsfs- File system operationssql- SQL interfacedatetimestamp
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 Time¶
type Time(microseconds: Int64)
Length of time, unrelated to calendar events. Can be interpreted as duration or offset from the midnight.
Backed by a signed 64-bit integer, representing number of microseconds.
func timezone_offset¶
func timezone_offset(time_zone: Text, date: Date): Time
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).