pub struct HostMeshRef { /* private fields */ }
Expand description
A non-owning reference to a mesh of hosts.
Logically, this is a data structure that contains a set of ranked
hosts organized into a Region
. HostMeshRef
s can be sliced to
produce new references that contain a subset of the hosts in the
original mesh.
HostMeshRef
s have a concrete syntax, implemented by its
Display
and FromStr
implementations.
This type does not control lifecycle. It only describes the
topology of hosts. To take ownership and perform deterministic
teardown, use HostMesh::take
, which returns an owned
HostMesh
that guarantees cleanup on shutdown()
or Drop
.
Cloning this type does not confer ownership. If a corresponding
owned HostMesh
shuts down the hosts, operations via a cloned
HostMeshRef
may fail because the hosts are no longer running.
Implementations§
Source§impl HostMeshRef
impl HostMeshRef
Sourcepub fn from_hosts(hosts: Vec<ChannelAddr>) -> Self
pub fn from_hosts(hosts: Vec<ChannelAddr>) -> Self
Create a new HostMeshRef from an arbitrary set of hosts. This is meant to enable extrinsic bootstrapping.
Sourcepub async fn spawn(
&self,
cx: &impl Actor,
name: &str,
per_host: Extent,
) -> Result<ProcMesh>
pub async fn spawn( &self, cx: &impl Actor, name: &str, per_host: Extent, ) -> Result<ProcMesh>
Spawn a ProcMesh onto this host mesh. The per_host extent specifies the shape of the procs to spawn on each host.
Currently, spawn issues direct calls to each host agent. This will be fixed by maintaining a comm actor on the host service procs themselves.
Trait Implementations§
Source§impl Clone for HostMeshRef
impl Clone for HostMeshRef
Source§fn clone(&self) -> HostMeshRef
fn clone(&self) -> HostMeshRef
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for HostMeshRef
impl Debug for HostMeshRef
Source§impl<'de> Deserialize<'de> for HostMeshRef
impl<'de> Deserialize<'de> for HostMeshRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for HostMeshRef
impl Display for HostMeshRef
Source§impl FromStr for HostMeshRef
impl FromStr for HostMeshRef
Source§impl Hash for HostMeshRef
impl Hash for HostMeshRef
Source§impl Named for HostMeshRef
impl Named for HostMeshRef
Source§fn typename() -> &'static str
fn typename() -> &'static str
Source§fn typehash() -> u64
fn typehash() -> u64
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
Source§fn port() -> u64
fn port() -> u64
Source§impl PartialEq for HostMeshRef
impl PartialEq for HostMeshRef
Source§impl Ranked for HostMeshRef
impl Ranked for HostMeshRef
Source§impl RankedSliceable for HostMeshRef
impl RankedSliceable for HostMeshRef
Source§impl Serialize for HostMeshRef
impl Serialize for HostMeshRef
impl Eq for HostMeshRef
impl StructuralPartialEq for HostMeshRef
Auto Trait Implementations§
impl Freeze for HostMeshRef
impl RefUnwindSafe for HostMeshRef
impl Send for HostMeshRef
impl Sync for HostMeshRef
impl Unpin for HostMeshRef
impl UnwindSafe for HostMeshRef
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
Source§type State = T
type State = T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§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>
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>
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 moreSource§impl<T> MapIntoExt for Twhere
T: Ranked,
impl<T> MapIntoExt for Twhere
T: Ranked,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> QuoteExt for Twhere
T: ?Sized,
impl<T> QuoteExt for Twhere
T: ?Sized,
fn push_quoted<'q, Q, S>(&mut self, _q: Q, s: S)where
Q: QuoteInto<T>,
S: Into<Quotable<'q>>,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
Source§impl<T> View for T
impl<T> View for T
Source§impl<T> ViewExt for Twhere
T: View,
impl<T> ViewExt for Twhere
T: View,
Source§fn range<R>(&self, dim: &str, range: R) -> Result<<T as View>::View, ViewError>
fn range<R>(&self, dim: &str, range: R) -> Result<<T as View>::View, ViewError>
Source§fn group_by(
&self,
dim: &str,
) -> Result<impl Iterator<Item = <T as View>::View>, ViewError>
fn group_by( &self, dim: &str, ) -> Result<impl Iterator<Item = <T as View>::View>, ViewError>
dim
. The returned iterator enumerates all groups
as views in the extent of dim
to the last dimension of the view. Read more