Expand description
The render builder: the only way a flavor produces a view.
§Why an incoherent view is not expressible
ShardBuilder::channel demands a parent and ShardBuilder::user demands
a channel; in both cases the scope is derived from the parent’s through
Narrow, which can only extend. There is no free scope parameter anywhere.
That is what turns the closure property of crate::scope from something to
validate into something to rely on: a user is always at or below its
channel’s scope, so any observer who sees the user also sees the channel.
The one thing that does not follow the hierarchy is a link between channels, and it is therefore the one structural check in the model.
§What finish still has to check
Three properties are not structural, and each one is a real failure mode:
- Shared xor private (guide 3.4). Without it the shared view would say “admin in /g7/staff” while an overlay says “admin in A’s channel”, and the next shared delta would move the admin without the overlay reasserting itself. The client would drift silently, which is the worst class of bug this design can produce.
- An overlay only references what its connection can already see (guide 6.6). One lookup per overlay element forbids, in one stroke, placing someone in a channel that is about to vanish, in a channel that connection cannot see, or referencing a session that does not exist.
- A receiver sees its sender (guide 1.2). This is not a design choice: the Mumble client discards audio whose sender session it does not know, so an edge into a blind receiver is silence with extra steps.
REF: docs/design/guide-implementation.md 3
Structs§
- Channel
Ref - A handle to a channel placed in this render.
- Private
Builder - The constructor for one connection’s private elements.
- Rendered
- Everything one render produced.
- Shard
Builder - The uniform constructor handed to
crate::shard::ShardLogic::render. - UserRef
- A handle to a user placed in this render.
Enums§
- Build
Error - Why a render was refused.
- Narrow
- How a child’s scope relates to its parent’s.
Constants§
- MAX_
ACTIONS - How many context actions one connection may be offered in a single render.