pub struct ProcId { /* private fields */ }Expand description
Identifies a process in the actor system.
Identity (Eq, Hash, Ord) is determined by uid.
Implementations§
Source§impl ProcId
impl ProcId
Sourcepub fn singleton(label: Label) -> Self
pub fn singleton(label: Label) -> Self
Create a singleton ProcId identified by the given label.
Sourcepub fn instance(label: Label) -> Self
pub fn instance(label: Label) -> Self
Create an instance ProcId with a random uid and the given label.
Sourcepub fn to_path_elem(&self, base_dir: &Path) -> PathBuf
pub fn to_path_elem(&self, base_dir: &Path) -> PathBuf
Returns a unique path for this proc in the given directory. This is stable over the lifetime of the ProcId.
The basename is proc_id.pseudo_uid() rendered in base58, which keeps the
path short and host-unique. Both ends of a local link compute the same
pseudo uid, so the path is consistent without coordination. The
returned PathBuf is the on-disk socket path, which callers may use to
pre-flight existence before dialing.
Sourcepub fn pseudo_uid(&self) -> Uid
pub fn pseudo_uid(&self) -> Uid
A Uid suitable as a short, host-unique identifier — for example,
as a basename in a filesystem path.
For an instance proc, this is the proc’s actual uid. For a singleton,
it is Uid::Instance(hash(label)), a stable value derived from the
singleton’s name. Singletons are host-unique by name, so this remains
host-unique. We call it “pseudo” because in the singleton case it does
not match the proc’s true uid.
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 Ord for ProcId
impl Ord for ProcId
Source§impl PartialOrd for ProcId
impl PartialOrd for ProcId
impl Eq 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 UnsafeUnpin 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> 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<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<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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].