Spacetime::SATS::AlgebraicValue
Dynamic value representation for any SATS AlgebraicType.
Supports schema-guided BSATN encoding/decoding, SATS-JSON conversion, SATN human-readable formatting, and structural type checking.
Constructors
connection_id(cid : ConnectionId) : self
Sourcedecode_bsatn(ty : AlgebraicType, decoder : BSATN::Decoder, typespace : Typespace | Nil = nil) : self
Decodes an AlgebraicValue from BSATN guided by ty and typespace.
Parses a SATS-JSON JSON::Any into an AlgebraicValue guided by ty and typespace.
i256(val : I256) : self
Sourceidentity(id : Identity) : self
Sourcenew(tag : AlgebraicType::Tag, raw : RawPayload)
Sourcenone
Sourceproduct(val : ProductValue) : self
Sourcesome(inner : AlgebraicValue) : self
Sourcetime_duration(dur : TimeDuration) : self
Sourcetimestamp(ts : Timestamp) : self
Sourceu256(val : U256) : self
Sourceunit
SourceInstance methods
as_array
Sourceas_bool
Sourceas_bytes
Sourceas_f32
Sourceas_f64
Sourceas_i128
Sourceas_i16
Sourceas_i256
Sourceas_i32
Sourceas_i64
Sourceas_i8
Sourceas_string
Sourceas_sum
Sourceas_u128
Sourceas_u16
Sourceas_u256
Sourceas_u32
Sourceas_u64
Sourceas_u8
Sourceraw
Sourcetag
SourceFormats this value in SATN (Spacetime Algebraic Type Notation) human-readable syntax.
Serializes this AlgebraicValue to SATS-JSON guided by ty and typespace.