Skip to main content

Deploy

Trait Deploy 

Source
pub trait Deploy<'a> {
    type Meta: Default;
    type InstantiateEnv;
    type Process: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + Clone;
    type Cluster: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + Clone;
    type External: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + RegisterPort<'a, Self>;

Show 18 methods // Required methods fn o2o_sink_source( env: &mut Self::InstantiateEnv, p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, name: Option<&str>, ) -> (Expr, Expr); fn o2o_connect( p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, ) -> Box<dyn FnOnce()>; fn o2m_sink_source( env: &mut Self::InstantiateEnv, p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, name: Option<&str>, ) -> (Expr, Expr); fn o2m_connect( p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, ) -> Box<dyn FnOnce()>; fn m2o_sink_source( env: &mut Self::InstantiateEnv, c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, name: Option<&str>, ) -> (Expr, Expr); fn m2o_connect( c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, ) -> Box<dyn FnOnce()>; fn m2m_sink_source( env: &mut Self::InstantiateEnv, c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, name: Option<&str>, ) -> (Expr, Expr); fn m2m_connect( c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, ) -> Box<dyn FnOnce()>; fn e2o_many_source( extra_stmts: &mut Vec<Stmt>, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, codec_type: &Type, shared_handle: String, ) -> Expr; fn e2o_many_sink(shared_handle: String) -> Expr; fn e2o_source( extra_stmts: &mut Vec<Stmt>, p1: &Self::External, p1_port: &<Self::External as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, codec_type: &Type, shared_handle: String, ) -> Expr; fn e2o_connect( p1: &Self::External, p1_port: &<Self::External as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, many: bool, server_hint: NetworkHint, ) -> Box<dyn FnOnce()>; fn o2e_sink( p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, p2: &Self::External, p2_port: &<Self::External as Node>::Port, shared_handle: String, ) -> Expr; fn cluster_ids( of_cluster: LocationKey, ) -> impl QuotedWithContext<'a, &'a [TaglessMemberId], ()> + Clone + 'a; fn cluster_self_id( ) -> impl QuotedWithContext<'a, TaglessMemberId, ()> + Clone + 'a; fn cluster_membership_stream( env: &mut Self::InstantiateEnv, at_location: &LocationId, location_id: &LocationId, ) -> impl QuotedWithContext<'a, Box<dyn Stream<Item = (TaglessMemberId, MembershipEvent)> + Unpin>, ()>; // Provided methods fn register_embedded_input( _env: &mut Self::InstantiateEnv, _location_key: LocationKey, _ident: &Ident, _element_type: &Type, ) { ... } fn register_embedded_output( _env: &mut Self::InstantiateEnv, _location_key: LocationKey, _ident: &Ident, _element_type: &Type, ) { ... }
}
Available on crate feature build only.

Required Associated Types§

Source

type Meta: Default

Source

type InstantiateEnv

Source

type Process: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + Clone

Source

type Cluster: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + Clone

Source

type External: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + RegisterPort<'a, Self>

Required Methods§

Source

fn o2o_sink_source( env: &mut Self::InstantiateEnv, p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, name: Option<&str>, ) -> (Expr, Expr)

Generates the source and sink expressions when connecting a Self::Process to another Self::Process.

The Self::InstantiateEnv can be used to record metadata about the created channel. The provided name is the user-configured channel name from the network IR node.

Source

fn o2o_connect( p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, ) -> Box<dyn FnOnce()>

Performs any runtime wiring needed after code generation for a Self::Process-to-Self::Process channel.

The returned closure is executed once all locations have been instantiated.

Source

fn o2m_sink_source( env: &mut Self::InstantiateEnv, p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, name: Option<&str>, ) -> (Expr, Expr)

Generates the source and sink expressions when connecting a Self::Process to a Self::Cluster (one-to-many).

The sink expression is used on the sending process and the source expression on each receiving cluster member. The Self::InstantiateEnv can be used to record metadata about the created channel. The provided name is the user-configured channel name from the network IR node.

Source

fn o2m_connect( p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, ) -> Box<dyn FnOnce()>

Performs any runtime wiring needed after code generation for a Self::Process-to-Self::Cluster channel.

The returned closure is executed once all locations have been instantiated.

Source

fn m2o_sink_source( env: &mut Self::InstantiateEnv, c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, name: Option<&str>, ) -> (Expr, Expr)

Generates the source and sink expressions when connecting a Self::Cluster to a Self::Process (many-to-one).

The sink expression is used on each sending cluster member and the source expression on the receiving process. The Self::InstantiateEnv can be used to record metadata about the created channel. The provided name is the user-configured channel name from the network IR node.

Source

fn m2o_connect( c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, ) -> Box<dyn FnOnce()>

Performs any runtime wiring needed after code generation for a Self::Cluster-to-Self::Process channel.

The returned closure is executed once all locations have been instantiated.

Source

fn m2m_sink_source( env: &mut Self::InstantiateEnv, c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, name: Option<&str>, ) -> (Expr, Expr)

Generates the source and sink expressions when connecting a Self::Cluster to another Self::Cluster (many-to-many).

The sink expression is used on each sending cluster member and the source expression on each receiving cluster member. The Self::InstantiateEnv can be used to record metadata about the created channel. The provided name is the user-configured channel name from the network IR node.

Source

fn m2m_connect( c1: &Self::Cluster, c1_port: &<Self::Cluster as Node>::Port, c2: &Self::Cluster, c2_port: &<Self::Cluster as Node>::Port, ) -> Box<dyn FnOnce()>

Performs any runtime wiring needed after code generation for a Self::Cluster-to-Self::Cluster channel.

The returned closure is executed once all locations have been instantiated.

Source

fn e2o_many_source( extra_stmts: &mut Vec<Stmt>, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, codec_type: &Type, shared_handle: String, ) -> Expr

Source

fn e2o_many_sink(shared_handle: String) -> Expr

Source

fn e2o_source( extra_stmts: &mut Vec<Stmt>, p1: &Self::External, p1_port: &<Self::External as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, codec_type: &Type, shared_handle: String, ) -> Expr

Source

fn e2o_connect( p1: &Self::External, p1_port: &<Self::External as Node>::Port, p2: &Self::Process, p2_port: &<Self::Process as Node>::Port, many: bool, server_hint: NetworkHint, ) -> Box<dyn FnOnce()>

Source

fn o2e_sink( p1: &Self::Process, p1_port: &<Self::Process as Node>::Port, p2: &Self::External, p2_port: &<Self::External as Node>::Port, shared_handle: String, ) -> Expr

Source

fn cluster_ids( of_cluster: LocationKey, ) -> impl QuotedWithContext<'a, &'a [TaglessMemberId], ()> + Clone + 'a

Source

fn cluster_self_id() -> impl QuotedWithContext<'a, TaglessMemberId, ()> + Clone + 'a

Source

fn cluster_membership_stream( env: &mut Self::InstantiateEnv, at_location: &LocationId, location_id: &LocationId, ) -> impl QuotedWithContext<'a, Box<dyn Stream<Item = (TaglessMemberId, MembershipEvent)> + Unpin>, ()>

Provided Methods§

Source

fn register_embedded_input( _env: &mut Self::InstantiateEnv, _location_key: LocationKey, _ident: &Ident, _element_type: &Type, )

Registers an embedded input for the given ident and element type.

Only meaningful for the embedded deployment backend. The default implementation panics.

Source

fn register_embedded_output( _env: &mut Self::InstantiateEnv, _location_key: LocationKey, _ident: &Ident, _element_type: &Type, )

Registers an embedded output for the given ident and element type.

Only meaningful for the embedded deployment backend. The default implementation panics.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§