pub struct Subscription {
pub upstreams: Vec<Upstream>,
}Expand description
The subscribe(…) container: a node’s whole FAN-IN, entry by entry.
One Upstream per upstream(…) inside it, in the order written — which is the order the
emitted In enum’s variants take, and the order a keyed group’s payloads sit in.
Fields§
§upstreams: Vec<Upstream>The entries, in declaration order.
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub fn keyed(&self) -> impl Iterator<Item = &Upstream>
pub fn keyed(&self) -> impl Iterator<Item = &Upstream>
The entries that carry the bare word key — THE keyed group, in declaration order.
One group per container and structurally so: key joins THE group rather than opening one, so
there is no second group to name and no word that would name it. A group(…) word arrives if
a declaration ever needs two.
Sourcepub fn straight(&self) -> impl Iterator<Item = &Upstream>
pub fn straight(&self) -> impl Iterator<Item = &Upstream>
The entries that carry no key — each one an independent flow, one In variant apiece.
Sourcepub fn is_sum(&self) -> bool
pub fn is_sum(&self) -> bool
Whether this container needs an emitted In type at all.
A single straight source is TODAY’S WORLD: one upstream, one message type, and the bare type
is what an author writes for In. An enum there would be a one-variant wrapper around a type
that already exists. Anything else — several upstreams, or a keyed group of any size — is a sum,
because what arrives is one of several things.