Skip to main content

entity

Attribute Macro entity 

Source
#[entity]
Expand description

Attribute macro for entity struct definitions.

Generates the Entity trait implementation for the struct.

§Attributes

  • #[entity] — entity type name = struct name
  • #[entity(name = "CustomName")] — custom entity type name
  • #[entity(shard_group = "premium")] — custom shard group
  • #[entity(max_idle_time_secs = 120)] — custom max idle time
  • #[entity(mailbox_capacity = 50)] — custom mailbox capacity
  • #[entity(concurrency = 4)] — custom concurrency limit
  • #[entity(krate = "crate")] — for internal use within cruster