Skip to main content

Upstream

Struct Upstream 

Source
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: Path

The 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: bool

Whether 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: Ident

The 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: bool

Whether 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

Source

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.

Trait Implementations§

Source§

impl Clone for Upstream

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Upstream

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.