Modules§
Macros§
- Similar to
wait1_for_callback!
but will invoke the callback multiple times until success. Users need provide a closure$request_fn
that takes a user defined state and produces a triple of(request_to_other, regex, new_state)
. If the request fails to produce the matching regex, the closure will be invoked again withnew_state
instead ofstate
. This will continue until success or a finite number of failures has been reached. - Waits until a GhostCanTrack process has been invoked and work was done.
- Continues processing the GhostActor or GhostCanTrack trait until no work is being done.
Structs§
- it seems as though
- an expanded endpoint usable to send/receive requests/responses/events see
GhostEndpoint::as_context_endpoint_builder
for additional details create_ghost_channel
outputs two endpoints, a parent_endpoint, and a child_endpoint these raw endpoints are not very useful on their own. When you get them to the place they will be used, you probably want to callas_context_endpoint_builder()
on them.- GhostError used in GhostResult responses
- GhostContextEndpoints allow you to drain these incoming
GhostMessage
s A GhostMessage contains the incoming request, as well as a hook to allow a response to automatically be returned. - helper struct that merges (on the parent side) the actual child GhostActor instance, with the child’s ghost channel endpoint. You only have to call process() on this one struct, and it provides all the request / drain_messages etc functions from GhostEndpoint.
- same as above, but takes a trait object child
- GhostTracker registers callbacks associated with request_ids that can be triggered later when a response comes back indicating that id
Enums§
- specify whether we want to capture backtraces, and if they should be resolved
- The specific type of an error.
- a ghost request callback can be invoked with a response that was injected into the system through the
handle
pathway, or to indicate a failure such as a timeout
Traits§
- indicates this type is able to make callback requests && respond to requests
Functions§
- We want to create a two-way communication channel between a GhostActor and its parent.
create_ghost_channel
will output two GhostEndpoint structures, the first one is the parent side, the second is the child’s.
Type Aliases§
- definition for a ghost request callback note, the callback can be registered as
'static
because the code definition itself doesn’t depend on any specific instance lifetime if you want to mutate the state of a struct instance, pass it in with thehandle
orprocess
call. (see detach crate for help with self refs) - Result type for GhostErrors