[][src]Type Definition quill_prototype::System

type System = fn(_: &mut State) -> SysResult;

A system, the S part of the ECS.

System functions are invoked each tick.

A system returns a SysResult, which is a Result<(), anyhow::Error>. (See anyhow.)

Returning an error should be preferred to panicking, as it allows for more graceful recovery. If your plugin panics, then the server will have to reload it as its internal state can no longer be considered intact. On the other hand, returning an error from a system will result in a console message, but it typically won't cause anything to break.