Trait hydro_lang::deploy::Deploy
source · pub trait Deploy<'a> {
type InstantiateEnv;
type CompileEnv;
type Process: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + Clone;
type Cluster: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + Clone;
type ExternalProcess: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + RegisterPort<'a, Self>;
type Port: Clone;
type ExternalRawPort;
type Meta: Default;
type GraphId;
Show 20 methods
// Required methods
fn allocate_process_port(process: &Self::Process) -> Self::Port;
fn allocate_cluster_port(cluster: &Self::Cluster) -> Self::Port;
fn allocate_external_port(external: &Self::ExternalProcess) -> Self::Port;
fn o2o_sink_source(
compile_env: &Self::CompileEnv,
p1: &Self::Process,
p1_port: &Self::Port,
p2: &Self::Process,
p2_port: &Self::Port,
) -> (Expr, Expr);
fn o2o_connect(
p1: &Self::Process,
p1_port: &Self::Port,
p2: &Self::Process,
p2_port: &Self::Port,
) -> Box<dyn FnOnce()>;
fn o2m_sink_source(
compile_env: &Self::CompileEnv,
p1: &Self::Process,
p1_port: &Self::Port,
c2: &Self::Cluster,
c2_port: &Self::Port,
) -> (Expr, Expr);
fn o2m_connect(
p1: &Self::Process,
p1_port: &Self::Port,
c2: &Self::Cluster,
c2_port: &Self::Port,
) -> Box<dyn FnOnce()>;
fn m2o_sink_source(
compile_env: &Self::CompileEnv,
c1: &Self::Cluster,
c1_port: &Self::Port,
p2: &Self::Process,
p2_port: &Self::Port,
) -> (Expr, Expr);
fn m2o_connect(
c1: &Self::Cluster,
c1_port: &Self::Port,
p2: &Self::Process,
p2_port: &Self::Port,
) -> Box<dyn FnOnce()>;
fn m2m_sink_source(
compile_env: &Self::CompileEnv,
c1: &Self::Cluster,
c1_port: &Self::Port,
c2: &Self::Cluster,
c2_port: &Self::Port,
) -> (Expr, Expr);
fn m2m_connect(
c1: &Self::Cluster,
c1_port: &Self::Port,
c2: &Self::Cluster,
c2_port: &Self::Port,
) -> Box<dyn FnOnce()>;
fn e2o_source(
compile_env: &Self::CompileEnv,
p1: &Self::ExternalProcess,
p1_port: &Self::Port,
p2: &Self::Process,
p2_port: &Self::Port,
) -> Expr;
fn e2o_connect(
p1: &Self::ExternalProcess,
p1_port: &Self::Port,
p2: &Self::Process,
p2_port: &Self::Port,
) -> Box<dyn FnOnce()>;
fn o2e_sink(
compile_env: &Self::CompileEnv,
p1: &Self::Process,
p1_port: &Self::Port,
p2: &Self::ExternalProcess,
p2_port: &Self::Port,
) -> Expr;
fn o2e_connect(
p1: &Self::Process,
p1_port: &Self::Port,
p2: &Self::ExternalProcess,
p2_port: &Self::Port,
) -> Box<dyn FnOnce()>;
fn cluster_ids(
env: &Self::CompileEnv,
of_cluster: usize,
) -> impl QuotedWithContext<'a, &'a Vec<u32>, ()> + Copy + 'a;
fn cluster_self_id(
env: &Self::CompileEnv,
) -> impl QuotedWithContext<'a, u32, ()> + Copy + 'a;
// Provided methods
fn has_trivial_node() -> bool { ... }
fn trivial_process(_id: usize) -> Self::Process { ... }
fn trivial_cluster(_id: usize) -> Self::Cluster { ... }
}
Required Associated Types§
type InstantiateEnv
type CompileEnv
type Process: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + Clone
type Cluster: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + Clone
type ExternalProcess: Node<Meta = Self::Meta, InstantiateEnv = Self::InstantiateEnv> + RegisterPort<'a, Self>
type Port: Clone
type ExternalRawPort
type Meta: Default
Required Methods§
fn allocate_process_port(process: &Self::Process) -> Self::Port
fn allocate_cluster_port(cluster: &Self::Cluster) -> Self::Port
fn allocate_external_port(external: &Self::ExternalProcess) -> Self::Port
fn o2o_sink_source( compile_env: &Self::CompileEnv, p1: &Self::Process, p1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> (Expr, Expr)
fn o2o_connect( p1: &Self::Process, p1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> Box<dyn FnOnce()>
fn o2m_sink_source( compile_env: &Self::CompileEnv, p1: &Self::Process, p1_port: &Self::Port, c2: &Self::Cluster, c2_port: &Self::Port, ) -> (Expr, Expr)
fn o2m_connect( p1: &Self::Process, p1_port: &Self::Port, c2: &Self::Cluster, c2_port: &Self::Port, ) -> Box<dyn FnOnce()>
fn m2o_sink_source( compile_env: &Self::CompileEnv, c1: &Self::Cluster, c1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> (Expr, Expr)
fn m2o_connect( c1: &Self::Cluster, c1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> Box<dyn FnOnce()>
fn m2m_sink_source( compile_env: &Self::CompileEnv, c1: &Self::Cluster, c1_port: &Self::Port, c2: &Self::Cluster, c2_port: &Self::Port, ) -> (Expr, Expr)
fn m2m_connect( c1: &Self::Cluster, c1_port: &Self::Port, c2: &Self::Cluster, c2_port: &Self::Port, ) -> Box<dyn FnOnce()>
fn e2o_source( compile_env: &Self::CompileEnv, p1: &Self::ExternalProcess, p1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> Expr
fn e2o_connect( p1: &Self::ExternalProcess, p1_port: &Self::Port, p2: &Self::Process, p2_port: &Self::Port, ) -> Box<dyn FnOnce()>
fn o2e_sink( compile_env: &Self::CompileEnv, p1: &Self::Process, p1_port: &Self::Port, p2: &Self::ExternalProcess, p2_port: &Self::Port, ) -> Expr
fn o2e_connect( p1: &Self::Process, p1_port: &Self::Port, p2: &Self::ExternalProcess, p2_port: &Self::Port, ) -> Box<dyn FnOnce()>
fn cluster_ids( env: &Self::CompileEnv, of_cluster: usize, ) -> impl QuotedWithContext<'a, &'a Vec<u32>, ()> + Copy + 'a
fn cluster_self_id( env: &Self::CompileEnv, ) -> impl QuotedWithContext<'a, u32, ()> + Copy + 'a
Provided Methods§
fn has_trivial_node() -> bool
fn trivial_process(_id: usize) -> Self::Process
fn trivial_cluster(_id: usize) -> Self::Cluster
Object Safety§
This trait is not object safe.