Skip to main content

FakeNetworkLinks

Trait FakeNetworkLinks 

Source
pub trait FakeNetworkLinks<SendMeta, RecvMeta, CtxId> {
    // Required method
    fn map_link(
        &self,
        ctx: CtxId,
        meta: SendMeta,
    ) -> Vec<(CtxId, RecvMeta, Option<Duration>)>;
}
Expand description

A set of links in a FakeNetwork.

A FakeNetworkLinks represents the set of links in a FakeNetwork. It exposes the link information by providing the ability to map from a frame’s sending metadata - including its context, local state, and SendMeta - to the set of appropriate receivers, each represented by a context ID, receive metadata, and latency.

Required Methods§

Maps a link from the send metadata of the context to the receive metadata.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<SendMeta, RecvMeta, CtxId, F: Fn(CtxId, SendMeta) -> Vec<(CtxId, RecvMeta, Option<Duration>)>> FakeNetworkLinks<SendMeta, RecvMeta, CtxId> for F