Skip to main content

Module desktop_group

Module desktop_group 

Source
Expand description

Several apps asked for in one Desktop call. Each app is still its own sensitive request, with its own card, countdown, veto and grant, and nothing about one decides another. What the group changes is only what the agent is told: the notes for the requests of one call are held, and when every one has ended the agent gets a single note naming each app as allowed, declined, vetoed or not decided.

Structs§

Group 🔒
Member 🔒

Enums§

Added 🔒
What add did.
Settled 🔒
How a request of a group ended.

Constants§

GROUP_TTL 🔒
A group that has not finished by then is flushed: the agent is told what is known, and its requests go back to sending their own notes. Longer than any review plus countdown.
MAX_GROUPS 🔒
The most groups waiting at once, across all agents.
MAX_MEMBERS 🔒
The most apps one call asks for.

Statics§

GROUPS 🔒

Functions§

add 🔒
Add the request filed for app to the group of this call, making the group if it is the first.
finished 🔒
Every member ended: it has an outcome, or its request is no longer open.
flush 🔒
End the group now whatever is left, as its deadline does: the note says what is known, and an app still waiting says so and will send its own note when it is decided. Nothing happens if the group already finished.
holds 🔒
A request’s progress notes (approved, counting down) are held while it is in a group and the group’s agent is the only one that asks for it.
holds_for 🔒
in_group 🔒
Whether request_id is already one of the requests of the group key: the call named a second window of an app it already asked for.
key 🔒
The key of one call’s group.
line 🔒
app and what became of it.
note 🔒
owned_by 🔒
Whether the group’s agent is the only one that asks for the request now. A request another agent joined, or one the group’s agent withdrew, is the other agents’ to be told about, so it is not the group’s.
request_is_open 🔒
Whether a request is still open in the registry.
seal 🔒
The call has filed every request: from now on the group may finish. Returns the note when every one has already ended.
settle_member 🔒
Record how request_id ended, with askers, the agents that ask for it now. Returns whether its own note is left out (it is a member and the group’s agent is the only asker), and the note to send when that finished its group. Both come from one look at the groups, so a deadline that ends the group in between can’t make a request look held when it is not. A request the group’s agent no longer asks for alone is recorded as not decided for the group, so the group’s note never reports an answer that was another agent’s.
take_if_finished 🔒

Type Aliases§

Done 🔒
The pane and the note to send when the group is finished, and the group is gone.