Flexweave
API Reference

Object Lifecycle

Object destruction and object-keyed store cleanup.

Public exports:

  • ObjectLifecycleStore
  • ObjectDestructionDriver
  • ObjectDestroy

ObjectDestroy destroys a live object id in an ObjectStore.

Types

TypePurpose
ObjectLifecycleStore<Event>Trait for stores that remove object-keyed state.
ObjectDestructionDriverCoordinates one object store and registered cleanup stores.
ObjectDestroyCommand builder for destroying one object id.

ObjectDestructionDriver

APIBehavior
newCreates a driver for one ObjectStore.
registerAdds a cleanup store in cleanup order.
with_storeAdds a cleanup store and returns the driver.

ObjectDestroy

APIBehavior
newCreates a destroy command for one object id.
runDestroys the id and returns cleanup events.
run_streamingDestroys the id and streams cleanup events.

ObjectDestructionDriver registers stores that should remove object-keyed state after destruction succeeds.

Built-in cleanup support includes data stores, attributes, derived attributes, ability stores, and effect pipelines. Ability and effect cleanup can emit their normal lifecycle facts.

ObjectDestroy returns CoreError::InvalidObjectId when the id is invalid or not live. Store cleanup runs only after object destruction succeeds.

On this page