pub struct Upstream {
pub node: Path,
pub keyed: bool,
pub out: Option<Ident>,
pub variant: Ident,
pub channel: Option<ChannelOptions>,
pub changes: Option<ChangesFeed>,
pub notify: bool,
}Expand description
ONE entry of a subscribe(…) container: an upstream, how it arrives, and which of its products
this edge carries.
Fields§
§node: PathThe upstream node, as the declaration spelled it.
A PATH carried verbatim and resolved nowhere, for RecordModel::subscribe’s reason: the
variant’s payload is a projection through it, so the compiler resolves it at the declaration
that wrote the string.
keyed: boolWhether the entry carried the bare word key — that it joins THE keyed group.
out: Option<Ident>out = "<Variant>" — which product of a multi-product upstream this edge carries, or None
where the upstream emits one and the question does not arise.
variant: IdentThe name this entry takes in the emitted In enum.
The upstream path’s last segment, or — where out = … selected one product of several — the
PRODUCT’s own variant word: that is the name the declaration wrote for this edge, and it is
what keeps two products of ONE node apart without a word the grammar does not have yet.
channel: Option<ChannelOptions>channel = bounded(512) / channel = unbounded — the AUTHOR’S DEFAULT for this edge, or
None where the declaration said nothing.
A default and not a law: a deployment’s [node.channels] block overrides it, kind included,
and what stands where neither speaks is the framework’s shipped constant. None is therefore a
state of its own rather than a stand-in for the constant — it is this declaration said
nothing, which is what lets the layer under it be reached at all.
changes: Option<ChangesFeed>changes(<db>) / changes(<db>(external)) — the STORE’s own change feed as this edge’s
intake, or None where the edge takes the ordinary channel.
The default is the channel, so this is a state of its own rather than a stand-in: what a declaration says by writing nothing is messages, and a store’s feed is what it says by naming a database.
notify: boolWhether the entry carried the bare word notify — that this edge carries the landed entity’s
KEY rather than the entity.
The RECEIPT, and it is the consumer’s to choose per entry: the upstream emits its product once
and the wiring projects (key, T) → key at the send site, so one store legally feeds a
message-receipt consumer and a notify-receipt one at the same time. Both modes are under the
same protocol law — only committed items, after the commit, in commit order — which is what
makes the key a SEQUENCING receipt rather than a smaller message.
Implementations§
Source§impl Upstream
impl Upstream
Sourcepub fn shelf(&self) -> RustSafeName
pub fn shelf(&self) -> RustSafeName
The FIELD this source takes in the emitted [node.channels] shelf, and the key a document
writes it under.
The P1 naming law, one axis over: the word this edge is already known by — the upstream type’s
own name, or the product’s where out = "…" selected one — in snake case. Read off the
declaration rather than declared, so a rename moves the document’s key with the type it names
and there is no second vocabulary to keep in step.