ygleam/y

Types

pub type AbstractType

The BaseType type represents the basic Javascript types Yjs can hold:

  • String
  • Boolean
  • Number
  • Uint8Array
  • Array
  • Object<String, BaseType>
pub type BaseType
pub type Transaction
pub type YArray
pub type YDoc
pub type YMap
pub type YText
pub type YType {
  AbstractType(value: AbstractType)
  YDoc(value: YDoc)
  YMap(value: YMap)
  YArray(value: YArray)
  YText(value: YText)
  YXmlFragment(value: YXmlFragment)
  YXmlElement(value: YXmlElement)
}

Constructors

  • AbstractType(value: AbstractType)
  • YDoc(value: YDoc)
  • YMap(value: YMap)
  • YArray(value: YArray)
  • YText(value: YText)
  • YXmlFragment(value: YXmlFragment)
  • YXmlElement(value: YXmlElement)
pub type YValue {
  BaseType(value: Dynamic)
  YType(value: YType)
}

Constructors

  • BaseType(value: Dynamic)
  • YType(value: YType)
pub type YXmlElement
pub type YXmlFragment

Functions

pub fn array(
  from entries: List(a),
  of inner_type: fn(a) -> BaseType,
) -> BaseType
pub fn bit_array(input: BitArray) -> BaseType
pub fn bool(input: Bool) -> BaseType
pub fn decode(
  yvalue: YValue,
  decoder: fn(Dynamic) -> Result(a, List(DecodeError)),
) -> Result(a, List(DecodeError))
pub fn float(input: Float) -> BaseType
pub fn from_gleam_json(from: Json) -> BaseType
pub fn int(input: Int) -> BaseType
pub fn null() -> BaseType
pub fn nullable(
  from input: Option(a),
  of inner_type: fn(a) -> BaseType,
) -> BaseType
pub fn object(input: List(#(String, BaseType))) -> BaseType
pub fn preprocessed_array(from: List(BaseType)) -> BaseType
pub fn string(input: String) -> BaseType
Search Document