pub trait NetworkFor<T: ?Sized>: Sealed<T> {
type OrderingGuarantee: Ordering;
type ConsistencyGuarantee: Consistency;
// Required methods
fn serialize_thunk(is_demux: bool) -> Expr;
fn deserialize_thunk(tagged: Option<&Type>) -> Expr;
fn name(&self) -> Option<&str>;
fn networking_info() -> NetworkingInfo;
// Provided method
fn is_embedded() -> bool { ... }
}Expand description
A networking backend implementation that supports items of type T.
Required Associated Types§
Sourcetype OrderingGuarantee: Ordering
type OrderingGuarantee: Ordering
The ordering guarantee provided by this network configuration.
When combined with an input stream’s ordering O, the output ordering
will be <O as MinOrder<Self::OrderingGuarantee>>::Min.
Sourcetype ConsistencyGuarantee: Consistency
type ConsistencyGuarantee: Consistency
The consistency guarantee this network configuration can preserve when the same data is
replicated to several recipients (e.g. via
Stream::broadcast_closed).
Failure policies that guarantee each recipient eventually observes the full stream of
sent messages, or that model failures as the recipient stopping entirely (such as
fail_stop or lossy_delayed_forever), preserve
EventualConsistency. Plain lossy
channels can silently drop individual messages for some recipients while others receive
them, so replicated outputs can permanently diverge and only
NoConsistency is guaranteed.
Required Methods§
Sourcefn serialize_thunk(is_demux: bool) -> Expr
fn serialize_thunk(is_demux: bool) -> Expr
Generates serialization logic for sending T.
Sourcefn deserialize_thunk(tagged: Option<&Type>) -> Expr
fn deserialize_thunk(tagged: Option<&Type>) -> Expr
Generates deserialization logic for receiving T.
Sourcefn networking_info() -> NetworkingInfo
fn networking_info() -> NetworkingInfo
Returns the NetworkingInfo describing this network channel’s transport and fault model.
Provided Methods§
Sourcefn is_embedded() -> bool
fn is_embedded() -> bool
Whether this network channel leaves serialization to code outside of Hydro (see
Embedded). When true, Self::serialize_thunk and Self::deserialize_thunk are
never called; the raw element type flows across the channel unserialized.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".