deriv/util

Types

pub type BirlTimeKind {
  BirlTimeISO8601
  BirlTimeNaive
  BirlTimeHTTP
  BirlTimeUnix
  BirlTimeUnixMilli
  BirlTimeUnixMicro
}

Constructors

  • BirlTimeISO8601
  • BirlTimeNaive
  • BirlTimeHTTP
  • BirlTimeUnix
  • BirlTimeUnixMilli
  • BirlTimeUnixMicro

Functions

pub fn birl_time_kind(
  type_: CustomType,
  variant: Variant,
  field: String,
  all_field_opts: Dict(DerivField, List(DerivFieldOpt)),
) -> BirlTimeKind
pub fn decode_type_field(
  variant variant: String,
  json_field json_field: String,
  pass decoder: Decoder(a),
) -> Decoder(a)
pub fn decoder_birl_from_http() -> Decoder(Time)
pub fn decoder_birl_from_naive() -> Decoder(Time)
pub fn decoder_birl_from_unix() -> Decoder(Time)
pub fn decoder_birl_from_unix_micro() -> Decoder(Time)
pub fn decoder_birl_from_unix_milli() -> Decoder(Time)
pub fn decoder_birl_parse() -> Decoder(Time)
pub fn decoder_uuid() -> Decoder(Uuid)
pub fn encode_birl_to_http(time: Time) -> Json
pub fn encode_birl_to_iso8601(time: Time) -> Json
pub fn encode_birl_to_naive(time: Time) -> Json
pub fn encode_birl_to_unix(time: Time) -> Json
pub fn encode_birl_to_unix_micro(time: Time) -> Json
pub fn encode_birl_to_unix_milli(time: Time) -> Json
pub fn encode_uuid(uuid: Uuid) -> Json
pub fn func_name(func: Definition(Function)) -> String
pub fn func_str(func: Definition(Function)) -> String
pub fn get_field_opts(
  all_field_opts: Dict(DerivField, List(DerivFieldOpt)),
  type_: CustomType,
  variant: Variant,
  field: String,
) -> List(DerivFieldOpt)
pub fn gleam_format(src: String) -> String
pub fn indent(str: String, level level: Int) -> String
pub fn replace_function(
  full_src: String,
  func_name func_name: String,
  func_src func_src: String,
) -> String
pub fn snake_case(str: String) -> String
pub fn then(
  result: Result(a, b),
  fun: fn(a) -> Result(c, d),
) -> Result(c, Nil)
pub fn update_funcs(
  init_src: String,
  funcs: List(#(String, String)),
) -> String
Search Document