Skip to main content

Mount

Trait Mount 

Source
pub trait Mount<N>
where N: Declared,
{ type In: Send + 'static; type Out: Send + 'static; type Error: Error + Send + Sync + 'static; type Body; type Intake; const SYNC: bool; // Required methods fn declare(blueprint: &mut Blueprint, mount: impl Into<Utf8Bytes>) -> NodeId; fn intake( wiring: &mut Wiring<'_>, node: NodeId, ) -> Result<Option<Self::Intake>, LaunchError>; fn wire( wiring: &mut Wiring<'_>, node: NodeId, operator: N, intake: Self::Intake, seats: Option<StreamOptions>, ) -> Result<Option<Self::Body>, LaunchError>; fn feeder<R>(ignition: &mut Ignition<R>, feeder: Outbox<ItemId, Self::In>); fn stage(staged: &mut Staging, mount: &str, body: Self::Body); fn ignite<R>( ignition: &mut Ignition<R>, body: Self::Body, ) -> Result<(), LaunchError>; }
Available on crate feature runtime only.
Expand description

WHAT ONE LINE OF A GRAPH ROOT’S LAUNCH DOES, at the cell the node’s own words selected.

The four steps a mounted node goes through — declared into the arrangement, wired to its topology, its intake door published, its body handed to the ignition — are four doors at the buffered pair and four different ones at the streaming pair. This is the one name the emission writes instead of either set, and the cell is what picks.

§The associated types carry their own bounds, which is what keeps the emission to ONE line

In, Out and Error are bounded HERE rather than at the launch, so a root’s per-node predicate is Worn<…>: Mount<N> and the five lines that used to spell the face’s own obligations are implied by it. What the emission still carries is what this trait says nothing about: the node’s CONSTRUCTION.

§Clone on Out is the SET’s, and the streaming cell no longer asks for one

The StreamLane never asked a payload to copy: the fan-out’s copy is taken through Sink::duplicate, at the downstream set that has the second seat to fill, so a lane over a set that answers PER PRODUCT drives a non-copying payload for every product whose subscribers it can serve without one. What used to stop that relax at THIS door was the WALK — every cell was wired through the framework’s Downstream, ONE product over N edges, whose own Sink impl is the thing that spends the copy.

The walk builds the NODE’S OWN set now. Declared::Wires is the seat that made it spellable and Wiring::lane_parts is what reads it, so the STREAMING cell states no Clone: a declaration that emits several products publishes through its own emitted <Node>Downstream, whose duplicate is resolved PER PRODUCT — so a product with one subscriber is asked for nothing while its neighbour with three is asked twice, and neither pays the other’s price. A streaming node that emits ONE thing still seats Downstream<Out>, and there the copy is that set’s own Sink impl’s obligation rather than this trait’s.

The other two cells DO state it, and they state it because they spend it: a Resident’s fan-out and a Helm’s both publish through Downstream<Out> in as many words, which is the fan-out itself.

§What a MULTI-PRODUCT declaration meets, and what it used to

It was on record here that mounting one would be a silent mis-route — every product to every edge — and the census found otherwise: a consumer that subscribes with out = "…" had its inbox minted at that PRODUCT’s type, the producer asked the same edge for its whole <Node>Out sum, and the two did not match. EdgeTypeError under LaunchError::Wiring, naming both types.

That refusal is gone at the STREAMING cell, because the question it answered is no longer asked: the producer offers each out-edge to its own set, and each product goes to the consumers that opened its edges. SEVERAL of them is the ordinary topology — an A/B split, a canary, a thumbnailer beside an embedder — and the fan serves each one past the first a copy from that product’s own door. The one shape left over is a second subscriber to a product whose payload has no copy to give, and the launch says so by name (ProductSeatError::Occupied), naming the payload rather than the topology.

A multi-product BUFFERED or AUTONOMOUS declaration meets the old refusal unchanged, and the derive is what makes it early: the emitted sum still derives Clone at those two pairs, because those two publish through the framework’s set.

Required Associated Constants§

Source

const SYNC: bool

Whether this mount’s body answers WITHOUT a future — what a root’s ALL_SYNC folds.

Read off the cell’s own face row (Driven::SYNC at the buffered pair, Streams::SYNC at the streaming one) rather than restated, so the two facts cannot disagree — and the fold reaches a streaming mount, which has no Driven row for the emission to have read one off.

Required Associated Types§

Source

type In: Send + 'static

The message this node consumes, at the pair its declaration wears.

Source

type Out: Send + 'static

The message it produces.

NOT Clone here, and it was: the copy belongs to the downstream SET a cell publishes through, so the two cells that publish through Downstream state it in their own where-clauses and the streaming cell — which publishes through the node’s own Wires seat — states nothing. See the trait note.

Source

type Error: Error + Send + Sync + 'static

Its per-item failure.

Source

type Body

What the wiring hands over for one node of this cell, and the ignition then spends.

Source

type Intake

WHAT THIS CELL’S BODY IS FED THROUGH — the receiving halves, in the shape its own pair takes them in.

One Inbox at the buffered and streaming pairs, because a driver loop drains ONE edge however many producers fill it; the node’s whole Upstreams set at the autonomous one, because a body that owns its loop selects over its arms and the arms are what a declaration with several upstreams asked for. It is a seat rather than a fixed type for exactly that difference — a root’s one emitted line per field cannot see which shape its node wants, and this is the cell answering on the node’s behalf.

Required Methods§

Source

fn declare(blueprint: &mut Blueprint, mount: impl Into<Utf8Bytes>) -> NodeId

Declare N at mount — Blueprint::node or Blueprint::stream.

Source

fn intake( wiring: &mut Wiring<'_>, node: NodeId, ) -> Result<Option<Self::Intake>, LaunchError>

TAKE N’s RECEIVING HALVES off the walk, in this cell’s own shape — Wiring::inbox or Wiring::upstreams.

The emitted entry’s first wiring line, and the reason it is a door here rather than one Wiring::inbox call at the launch: a mounted autonomous node draws through as many edges as its declaration named, and a root’s expansion cannot see how many that is or what holds them.

None where this deployment does not launch the node.

§Errors

Whatever the door it routes to refuses — see Wiring::inbox.

Source

fn wire( wiring: &mut Wiring<'_>, node: NodeId, operator: N, intake: Self::Intake, seats: Option<StreamOptions>, ) -> Result<Option<Self::Body>, LaunchError>

Wire the built operator to the declared topology — Wiring::resident or Wiring::lane_mount.

seats are the deployment’s own per-node stream seats, read off its NodeSection — None where it wrote none, which is nearly every section. They reach EVERY mount because the emission cannot see the word; a buffered cell holds no lane and spends none, and None is what a buffered root therefore pays: nothing at all.

None where this deployment does not launch the node.

§Errors

Whatever the door it routes to refuses — see Wiring::resident.

Source

fn feeder<R>(ignition: &mut Ignition<R>, feeder: Outbox<ItemId, Self::In>)

Publish the intake door onto N, which this deployment offers because N is a dataflow HEAD.

Source

fn stage(staged: &mut Staging, mount: &str, body: Self::Body)

Stage the node’s own VALUE out of a wired body, for a launch that refuses before it ignites.

The pre-ignition unwind says the goodbyes of everything the walk is holding, and where one node’s value has got to by then depends on the cell: inside a Resident at the buffered pair, and in a LaneMount’s warm set at the streaming one. So the cell is what takes it back out, and the walk stays one line.

The rest of the body goes first — the inbox, the outboxes, the downstream set — which is what lets a resource the goodbye reaches for be one handle closer to releasable while it is still being waited for.

Source

fn ignite<R>( ignition: &mut Ignition<R>, body: Self::Body, ) -> Result<(), LaunchError>

Hand the wired body to the ignition — an ENGINE at the buffered cell, and the cupboard the party that will drive it takes from at the streaming one.

§Errors

LaunchError::Ignition where the operating system refuses an engine. The streaming cell starts nothing and can refuse nothing.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<N> Mount<N> for Worn<Autonomous, Async>
where N: Declared<Mode = Async> + AsyncAutonomousOperator + Send + 'static, <N as AsyncAutonomousOperator>::In: Send + 'static, <N as AsyncAutonomousOperator>::Out: Clone + Send + 'static, <N as AsyncAutonomousOperator>::Error: Error + Send + Sync + 'static,

Source§

impl<N> Mount<N> for Worn<Autonomous, Block>
where N: Declared<Mode = Block> + AutonomousOperator + Send + 'static, <N as AutonomousOperator>::In: Send + 'static, <N as AutonomousOperator>::Out: Clone + Send + 'static, <N as AutonomousOperator>::Error: Error + Send + Sync + 'static,

Source§

impl<N> Mount<N> for Worn<Buffered, Async>
where N: Declared<Mode = Async> + AsyncOperator + Send + 'static, <N as AsyncOperator>::In: Send + 'static, <N as AsyncOperator>::Out: Clone + Send + 'static, <N as AsyncOperator>::Error: Error + Send + Sync + 'static, NodeAttribution<N, Async>: Attributes<<N as AsyncOperator>::Out>, DeclaredResident<N, Inbox<ItemId, <N as AsyncOperator>::In>, Async>: Drives + Send + 'static,

Source§

impl<N> Mount<N> for Worn<Buffered, Block>
where N: Declared<Mode = Block> + Operator + Send + 'static, <N as Operator>::In: Send + 'static, <N as Operator>::Out: Clone + Send + 'static, <N as Operator>::Error: Error + Send + Sync + 'static, NodeAttribution<N, Block>: Attributes<<N as Operator>::Out>, DeclaredResident<N, Inbox<ItemId, <N as Operator>::In>, Block>: Drives + Send + 'static,

Source§

impl<N> Mount<N> for Worn<Streaming, Async>
where N: Declared<Mode = Async> + AsyncStreamOperator + Send + 'static, <N as AsyncStreamOperator>::In: Send + 'static, <N as AsyncStreamOperator>::Out: Send + 'static, <N as AsyncStreamOperator>::Error: Error + Send + Sync + 'static, StreamWires<N, Async>: Attaches + Sink<<N as AsyncStreamOperator>::Out> + Send + 'static,

Source§

impl<N> Mount<N> for Worn<Streaming, Block>
where N: Declared<Mode = Block> + StreamOperator + Send + 'static, <N as StreamOperator>::In: Send + 'static, <N as StreamOperator>::Out: Send + 'static, <N as StreamOperator>::Error: Error + Send + Sync + 'static, StreamWires<N, Block>: Attaches + Sink<<N as StreamOperator>::Out> + Send + 'static,