ygleam/y_event

Types

pub type AnyYEvent {
  BaseEvent(
    event: YEvent,
    changes_keys: dict.Dict(String, ChangeAction),
  )
  MapEvent(
    event: YMapEvent,
    changes_keys: dict.Dict(String, ChangeAction),
  )
  ArrayEvent(
    event: YArrayEvent,
    changes_keys: dict.Dict(String, ChangeAction),
  )
  TextEvent(
    event: YTextEvent,
    changes_keys: dict.Dict(String, ChangeAction),
  )
  XmlEvent(
    event: YXmlEvent,
    changes_keys: dict.Dict(String, ChangeAction),
  )
}

Constructors

pub type ChangeAction {
  AddAction(old_value: option.Option(dynamic.Dynamic))
  UpdateAction(old_value: option.Option(dynamic.Dynamic))
  DeleteAction(old_value: option.Option(dynamic.Dynamic))
  UnknownAction(old_value: option.Option(dynamic.Dynamic))
}

Constructors

pub type ChangesKeys =
  dict.Dict(String, ChangeAction)
pub type PathSection {
  NumberSection(Int)
  StringSection(String)
}

Constructors

  • NumberSection(Int)
  • StringSection(String)
pub type YArrayEvent
pub type YEvent
pub type YMapEvent
pub type YTextEvent
pub type YXmlEvent

Values

pub fn current_target(y_event: AnyYEvent) -> y.Value
pub fn map_keys_changed(y_map_event: YMapEvent) -> List(String)
pub fn path(y_event: AnyYEvent) -> List(PathSection)
pub fn target(y_event: AnyYEvent) -> y.Value
pub fn text_keys_changed(
  y_text_event: YTextEvent,
) -> List(String)
pub fn transaction(y_event: AnyYEvent) -> y.Transaction
pub fn xml_attributes_changed(
  y_xml_event: YXmlEvent,
) -> List(String)
Search Document