pub enum MaelstromDeploy {}Available on crate feature
maelstrom only.Expand description
Deployment backend that targets Maelstrom for distributed systems testing.
This backend compiles Hydro programs to binaries that communicate via Maelstrom’s stdin/stdout JSON protocol. It is restricted to programs with:
- Exactly one cluster (no processes)
- A single external input channel for client communication
Trait Implementations§
Source§impl<'a> ClusterSpec<'a, MaelstromDeploy> for MaelstromClusterSpec
Available on crate feature deploy only.
impl<'a> ClusterSpec<'a, MaelstromDeploy> for MaelstromClusterSpec
Available on crate feature
deploy only.Source§fn build(self, key: LocationKey, name_hint: &str) -> MaelstromCluster
fn build(self, key: LocationKey, name_hint: &str) -> MaelstromCluster
Available on crate feature
build only.Source§impl<'a> Deploy<'a> for MaelstromDeploy
Available on crate feature deploy only.
impl<'a> Deploy<'a> for MaelstromDeploy
Available on crate feature
deploy only.Source§type InstantiateEnv = MaelstromDeployment
type InstantiateEnv = MaelstromDeployment
Available on crate feature
build only.Source§type Process = MaelstromProcess
type Process = MaelstromProcess
Available on crate feature
build only.Source§type Cluster = MaelstromCluster
type Cluster = MaelstromCluster
Available on crate feature
build only.Source§type External = MaelstromExternal
type External = MaelstromExternal
Available on crate feature
build only.Source§fn o2o_sink_source(
_p1: &Self::Process,
_p1_port: &<Self::Process as Node>::Port,
_p2: &Self::Process,
_p2_port: &<Self::Process as Node>::Port,
) -> (Expr, Expr)
fn o2o_sink_source( _p1: &Self::Process, _p1_port: &<Self::Process as Node>::Port, _p2: &Self::Process, _p2_port: &<Self::Process as Node>::Port, ) -> (Expr, Expr)
Available on crate feature
build only.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()>
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()>
Available on crate feature
build only.Source§fn o2m_sink_source(
_p1: &Self::Process,
_p1_port: &<Self::Process as Node>::Port,
_c2: &Self::Cluster,
_c2_port: &<Self::Cluster as Node>::Port,
) -> (Expr, Expr)
fn o2m_sink_source( _p1: &Self::Process, _p1_port: &<Self::Process as Node>::Port, _c2: &Self::Cluster, _c2_port: &<Self::Cluster as Node>::Port, ) -> (Expr, Expr)
Available on crate feature
build only.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()>
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()>
Available on crate feature
build only.Source§fn m2o_sink_source(
_c1: &Self::Cluster,
_c1_port: &<Self::Cluster as Node>::Port,
_p2: &Self::Process,
_p2_port: &<Self::Process as Node>::Port,
) -> (Expr, Expr)
fn m2o_sink_source( _c1: &Self::Cluster, _c1_port: &<Self::Cluster as Node>::Port, _p2: &Self::Process, _p2_port: &<Self::Process as Node>::Port, ) -> (Expr, Expr)
Available on crate feature
build only.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()>
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()>
Available on crate feature
build only.Source§fn m2m_sink_source(
_c1: &Self::Cluster,
_c1_port: &<Self::Cluster as Node>::Port,
_c2: &Self::Cluster,
_c2_port: &<Self::Cluster as Node>::Port,
) -> (Expr, Expr)
fn m2m_sink_source( _c1: &Self::Cluster, _c1_port: &<Self::Cluster as Node>::Port, _c2: &Self::Cluster, _c2_port: &<Self::Cluster as Node>::Port, ) -> (Expr, Expr)
Available on crate feature
build only.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()>
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()>
Available on crate feature
build only.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
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
Available on crate feature
build only.Source§fn e2o_many_sink(_shared_handle: String) -> Expr
fn e2o_many_sink(_shared_handle: String) -> Expr
Available on crate feature
build only.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
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
Available on crate feature
build only.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()>
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()>
Available on crate feature
build only.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
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
Available on crate feature
build only.Source§fn cluster_ids(
_of_cluster: LocationKey,
) -> impl QuotedWithContext<'a, &'a [TaglessMemberId], ()> + Clone + 'a
fn cluster_ids( _of_cluster: LocationKey, ) -> impl QuotedWithContext<'a, &'a [TaglessMemberId], ()> + Clone + 'a
Available on crate feature
build only.Source§fn cluster_self_id() -> impl QuotedWithContext<'a, TaglessMemberId, ()> + Clone + 'a
fn cluster_self_id() -> impl QuotedWithContext<'a, TaglessMemberId, ()> + Clone + 'a
Available on crate feature
build only.Source§fn cluster_membership_stream(
location_id: &LocationId,
) -> impl QuotedWithContext<'a, Box<dyn Stream<Item = (TaglessMemberId, MembershipEvent)> + Unpin>, ()>
fn cluster_membership_stream( location_id: &LocationId, ) -> impl QuotedWithContext<'a, Box<dyn Stream<Item = (TaglessMemberId, MembershipEvent)> + Unpin>, ()>
Available on crate feature
build only.Source§impl<'a> RegisterPort<'a, MaelstromDeploy> for MaelstromExternal
Available on crate feature deploy only.
impl<'a> RegisterPort<'a, MaelstromDeploy> for MaelstromExternal
Available on crate feature
deploy only.Source§fn register(&self, _external_port_id: ExternalPortId, _port: Self::Port)
fn register(&self, _external_port_id: ExternalPortId, _port: Self::Port)
Available on crate feature
build only.Source§fn as_bytes_bidi(
&self,
_external_port_id: ExternalPortId,
) -> impl Future<Output = (Pin<Box<dyn Stream<Item = Result<BytesMut, Error>>>>, Pin<Box<dyn Sink<Bytes, Error = Error>>>)> + 'a
fn as_bytes_bidi( &self, _external_port_id: ExternalPortId, ) -> impl Future<Output = (Pin<Box<dyn Stream<Item = Result<BytesMut, Error>>>>, Pin<Box<dyn Sink<Bytes, Error = Error>>>)> + 'a
Available on crate feature
build only.Source§fn as_bincode_bidi<InT, OutT>(
&self,
_external_port_id: ExternalPortId,
) -> impl Future<Output = (Pin<Box<dyn Stream<Item = OutT>>>, Pin<Box<dyn Sink<InT, Error = Error>>>)> + 'awhere
InT: Serialize + 'static,
OutT: DeserializeOwned + 'static,
fn as_bincode_bidi<InT, OutT>(
&self,
_external_port_id: ExternalPortId,
) -> impl Future<Output = (Pin<Box<dyn Stream<Item = OutT>>>, Pin<Box<dyn Sink<InT, Error = Error>>>)> + 'awhere
InT: Serialize + 'static,
OutT: DeserializeOwned + 'static,
Available on crate feature
build only.Source§fn as_bincode_sink<T: Serialize + 'static>(
&self,
_external_port_id: ExternalPortId,
) -> impl Future<Output = Pin<Box<dyn Sink<T, Error = Error>>>> + 'a
fn as_bincode_sink<T: Serialize + 'static>( &self, _external_port_id: ExternalPortId, ) -> impl Future<Output = Pin<Box<dyn Sink<T, Error = Error>>>> + 'a
Available on crate feature
build only.Source§fn as_bincode_source<T: DeserializeOwned + 'static>(
&self,
_external_port_id: ExternalPortId,
) -> impl Future<Output = Pin<Box<dyn Stream<Item = T>>>> + 'a
fn as_bincode_source<T: DeserializeOwned + 'static>( &self, _external_port_id: ExternalPortId, ) -> impl Future<Output = Pin<Box<dyn Stream<Item = T>>>> + 'a
Available on crate feature
build only.Auto Trait Implementations§
impl Freeze for MaelstromDeploy
impl RefUnwindSafe for MaelstromDeploy
impl Send for MaelstromDeploy
impl Sync for MaelstromDeploy
impl Unpin for MaelstromDeploy
impl UnwindSafe for MaelstromDeploy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.