Crate hooks

source ·

Structs§

  • A CapabilityReceiver lets a CapabilityRequested event subscriber take the opportunity to monitor requests for the corresponding capability.
  • This is a collection of hooks to component manager events.
  • An object registers a hook into a component manager event via a HooksRegistration object. A single object may register for multiple events through a vector of EventType. Hooks does not retain the callback. The hook is lazily removed when the callback object loses strong references.
  • Information about a component’s runtime provided to Started.

Enums§

Traits§

  • The component manager calls out to objects that implement the Hook trait on registered component manager events. Hooks block the flow of a task, and can mutate, decorate and replace capabilities. This permits Hook to serve as a point of extensibility for the component manager. IMPORTANT: Hooks must not block on completion of an Action since Hooks are often called while executing an Action. Waiting on an Action in a Hook could cause a deadlock. IMPORTANT: Hooks should avoid causing event dispatch because we do not guarantee serialization between Hooks. Therefore the order a receiver see events in may be unexpected.
  • Transfers any move-only state out of self into a new event that is otherwise a clone.