Skip to main content

Module embedded_runtime

Module embedded_runtime 

Source
Expand description

Runtime helpers for the embedded deployment backend.

This module is NOT gated on the build feature so that the staged re-exports are available at runtime in the generated code.

Structs§

Acknowledgements
What a host acknowledges about a stream the dataflow provides (an output, or the stream sent on a network channel): each way it may be weaker than ordered and exactly-once. The stream’s type already says what it may do, so an acknowledgement needs no justification: calling it is the host’s agreement, and a stream that becomes weaker fails the host’s build until the host acknowledges the change. An EmbeddedOutputChannel or EmbeddedNetworkOutputChannel is built from a sink and the Acknowledgements that cover what its marker’s stream may do.
ChannelConfiguration
The configuration of a network channel as the host acknowledges it: the transport Tr and serialization S of its network config, which must match the channel’s exactly (see EmbeddedNetworkChannel). It is built from the same network config value the dataflow sends with; the config’s name is ignored.
EmbeddedInputChannel
A channel flowing into an embedded dataflow, as the host provides it: a Stream for a stream input or a membership stream, for the channel C (its generated marker type, see EmbeddedChannel). The receiving end of a network channel is a EmbeddedNetworkInputChannel instead.
EmbeddedNetworkInputChannel
The receiving end of a network channel, as the host provides it: a Stream of the messages its transport delivers, for the channel end C (its generated marker type, under incoming).
EmbeddedNetworkOutputChannel
The sending end of a network channel, as the host provides it: an FnMut sink that hands each message to the host’s transport, for the channel end C (its generated marker type, under outgoing).
EmbeddedOutputChannel
An output of an embedded dataflow, as the host provides it: an FnMut sink for the channel M (its generated marker type, under outputs), whose EmbeddedChannel guarantees are what the dataflow’s output stream provides.
Promises
What a host promises about something it supplies, each guarantee promised separately with a manual_proof! saying why it holds. An EmbeddedInputChannel or EmbeddedNetworkInputChannel is built from a stream and the Promises that meet its marker’s guarantees.

Traits§

AcknowledgedBy
An output whose guarantees acknowledgements of ordering O and retries R cover: each acknowledged guarantee is weaker than (or the same as) the one the output provides. It is what EmbeddedOutputChannel::new requires.
ConfiguredAs
A network channel end whose configuration is exactly the acknowledged transport Tr and serialization S. Each part is checked separately, so a mismatch names the part the host acknowledges wrongly. It is what EmbeddedNetworkOutputChannel::new and EmbeddedNetworkInputChannel::new require.
EmbeddedChannel
A channel crossing the boundary of an embedded dataflow: a network channel end, a stream input, a membership stream, or an output, with its guarantees as marker types (Ordering and Retries).
EmbeddedNetworkChannel
The configuration of a network channel crossing the boundary of an embedded dataflow: the transport type Transport of the network config the dataflow sends with (for example Tcp<FailStop> for TCP.fail_stop(), or EmbeddedTransport<ExactlyOnce, NoOrder, FailStop> for EMBEDDED.may_reorder().never_duplicates().never_drops()), and its serialization Serialization (Bincode, or Embedded for an unserialized EMBEDDED channel).
SatisfiedBy
A channel whose guarantees promises of ordering O and retries R meet: each guarantee the channel needs is weaker than (or the same as) the one promised. It is what EmbeddedInputChannel::new requires, and lets a reusable transport state once what it provides: fn source<C: SatisfiedBy<TotalOrder, ExactlyOnce>>() serves every channel that needs at most that.

Functions§

embedded_cluster_membership_stream
Returns a [QuotedWithContext] that references a __membership_{idx} runtime variable.
embedded_cluster_self_id
Returns a [QuotedWithContext] that references the __cluster_self_id runtime variable.