OxL Reference

@ @transient

@transient

Applies to: actor, actor field

Section: §12.5

Syntax

ebnf
Attr        = "@" Path [ "(" [ AttrArgs ] ")" ] ;

Grammar: App. A

Defined in

Examples

oxl
@idle(ACCOUNT_IDLE)
actor Account sharded by id: AccountId {
  var balance: Money = Money.zero()
  @transient var hits: u64 = 0
  on activate { log.debug("account {id} up") }
  msg deposit(x: Money) { balance += x }
  msg balance() -> Money { balance }
}

Account(id).deposit(amount)

— 12.5 Sharded actors

Related diagnostics

actor-not-hosted

See also