pub enum ProcId {
Ranked(WorldId, Index),
Direct(ChannelAddr, String),
}
Expand description
Procs are identified by their rank within a world or by a direct channel address. Each proc represents an actor runtime that can locally route to all of its constituent actors.
Ranks >= 1usize << (no. bits in usize - 1) (i.e., with the high bit set) are “user” ranks. These are reserved for randomly generated identifiers not assigned by the system.
Variants§
Ranked(WorldId, Index)
A ranked proc within a world
Direct(ChannelAddr, String)
A proc reachable via a direct channel address, and local name.
Implementations§
Source§impl ProcId
impl ProcId
Sourcepub fn as_ranked_mut(&mut self) -> Option<(&mut WorldId, &mut Index)>
pub fn as_ranked_mut(&mut self) -> Option<(&mut WorldId, &mut Index)>
Optionally returns mutable references to the inner fields if this is a ProcId::Ranked
, otherwise None
Sourcepub fn as_ranked(&self) -> Option<(&WorldId, &Index)>
pub fn as_ranked(&self) -> Option<(&WorldId, &Index)>
Optionally returns references to the inner fields if this is a ProcId::Ranked
, otherwise None
Sourcepub fn into_ranked(self) -> Result<(WorldId, Index), Self>
pub fn into_ranked(self) -> Result<(WorldId, Index), Self>
Returns the inner fields if this is a ProcId::Ranked
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_direct_mut(&mut self) -> Option<(&mut ChannelAddr, &mut String)>
pub fn as_direct_mut(&mut self) -> Option<(&mut ChannelAddr, &mut String)>
Optionally returns mutable references to the inner fields if this is a ProcId::Direct
, otherwise None
Sourcepub fn as_direct(&self) -> Option<(&ChannelAddr, &String)>
pub fn as_direct(&self) -> Option<(&ChannelAddr, &String)>
Optionally returns references to the inner fields if this is a ProcId::Direct
, otherwise None
Sourcepub fn into_direct(self) -> Result<(ChannelAddr, String), Self>
pub fn into_direct(self) -> Result<(ChannelAddr, String), Self>
Returns the inner fields if this is a ProcId::Direct
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProcId
impl<'de> Deserialize<'de> for ProcId
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 Named for ProcId
impl Named for ProcId
Source§fn typename() -> &'static str
fn typename() -> &'static str
Source§fn typehash() -> u64
fn typehash() -> u64
Source§fn arm(&self) -> Option<&'static str>
fn arm(&self) -> Option<&'static str>
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
Source§impl Ord for ProcId
impl Ord for ProcId
Source§impl PartialOrd for ProcId
impl PartialOrd for ProcId
impl Eq for ProcId
impl StructuralPartialEq for ProcId
Auto Trait Implementations§
impl Freeze for ProcId
impl RefUnwindSafe for ProcId
impl Send for ProcId
impl Sync for ProcId
impl Unpin for ProcId
impl UnwindSafe for ProcId
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
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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 more