pub trait EmbeddedChannel {
type Ordering: Ordering;
type Retries: Retries;
}Expand description
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).
- For a stream input or membership stream, the guarantees are what the dataflow relies on,
which the host’s
Promisesmust meet. - For the sending end of a network channel, they are what the dataflow sends, which the
host’s
Acknowledgementsmust cover, as for an output. - For the receiving end of a network channel, they are what the dataflow relies on: the sent
stream, weakened by the channel’s configuration. The host’s
Promisesmust meet them, as for a stream input. - For an output, they are what the dataflow provides. The host’s
Acknowledgementsmust cover every way the output may be weaker than ordered and exactly-once.
Each location’s generated module has a marker type implementing this for each
channel crossing it, named after its field: under incoming / outgoing for
network channel ends, inputs for stream inputs, membership for membership streams, and
outputs for outputs. Each field of the generated structs is an EmbeddedInputChannel (a stream
input or membership stream), a EmbeddedNetworkInputChannel (a receiving end), a EmbeddedNetworkOutputChannel (a
sending end), or an EmbeddedOutputChannel (an output) over its marker. The marker is inferred from
the field. The markers of network channel ends also implement EmbeddedNetworkChannel.
Required Associated Types§
Sourcetype Ordering: Ordering
type Ordering: Ordering
The ordering the host must keep (for an output or the sending end of a network channel,
the ordering the dataflow provides): TotalOrder or NoOrder. For a network channel,
TotalOrder means each sender’s messages in the order it sent them; for an input, that
the stream’s order is the order to process; for a membership stream, each member’s events
in the order they happened.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".