butterbidi/script/types/primitive_protocol_value

Types

pub type BigIntValue {
  BigIntValue(remote_type: String, value: String)
}

Constructors

  • BigIntValue(remote_type: String, value: String)
pub type BooleanValue {
  BooleanValue(remote_type: String, value: Bool)
}

Constructors

  • BooleanValue(remote_type: String, value: Bool)
pub type NullValue {
  NullValue(remote_type: String)
}

Constructors

  • NullValue(remote_type: String)
pub type Number {
  Int(Int)
  Float(Float)
  Special(SpecialNumber)
}

Constructors

pub type NumberValue {
  NumberValue(remote_type: String, value: Number)
}

Constructors

  • NumberValue(remote_type: String, value: Number)
pub type PrimitiveProtocolValue {
  Undefined(UndefinedValue)
  Null(NullValue)
  String(StringValue)
  Number(NumberValue)
  Boolean(BooleanValue)
  BigInt(BigIntValue)
}

Constructors

pub type SpecialNumber {
  NaN
  NegativeZero
  Infinity
  NegativeInfinity
}

Constructors

  • NaN
  • NegativeZero
  • Infinity
  • NegativeInfinity
pub type StringValue {
  StringValue(remote_type: String, value: String)
}

Constructors

  • StringValue(remote_type: String, value: String)
pub type UndefinedValue {
  UndefinedValue(remote_type: String)
}

Constructors

  • UndefinedValue(remote_type: String)

Values

pub fn boolean(boolean: Bool) -> PrimitiveProtocolValue
pub fn float(float: Float) -> PrimitiveProtocolValue
pub fn int(int: Int) -> PrimitiveProtocolValue
pub fn number_to_json(number: Number) -> json.Json
pub fn number_to_string(number: Number) -> String
pub fn number_value_classifier(value: dynamic.Dynamic) -> Number
pub fn primitive_protocol_value_to_json(
  value: PrimitiveProtocolValue,
) -> json.Json
pub fn string(value: String) -> PrimitiveProtocolValue
pub fn to_bool(value: PrimitiveProtocolValue) -> Bool
pub fn to_string(value: PrimitiveProtocolValue) -> String
Search Document