OxL Справочник OxL
РусскийEnglish

fn emitOf

emit outside a transaction: like publishOf, but a failure is a panic. The generated code of emit Topic(x) calls it.

Example:

oxl✓ проверяется в CI
data Job { id: i64 }

topic Jobs: Job

cluster demo {
  role store { journal }
}

fn main() io, db {
  emit Jobs(Job{ id: 2 })
  print("emitted")
}
Вывод
emitted
pub(api) fn emitOf<T: Serializable>(h: i64, x: &T, key: bytes) -> ()  db

С версии. 1.0.0-beta

Параметры

ИмяТип
hi64
x&T
keybytes

Возвращает

()

Эффекты

db

Определено в: std/topic/topic.oxl:294

См. также