pub enum Addr {
Proc(ProcAddr),
Actor(ActorAddr),
Port(PortAddr),
}Expand description
A polymorphic reference: proc, actor, or port.
Used for prefix-based routing in [MailboxRouter] and
[DialMailboxRouter]. Ordering is lexicographic by
(proc, actor uid, port).
Variants§
Proc(ProcAddr)
A process reference.
Actor(ActorAddr)
An actor reference.
Port(PortAddr)
A port reference.
Implementations§
Source§impl Addr
impl Addr
Sourcepub fn as_proc_mut(&mut self) -> Option<&mut ProcAddr>
pub fn as_proc_mut(&mut self) -> Option<&mut ProcAddr>
Optionally returns mutable references to the inner fields if this is a Addr::Proc, otherwise None
Sourcepub fn as_proc(&self) -> Option<&ProcAddr>
pub fn as_proc(&self) -> Option<&ProcAddr>
Optionally returns references to the inner fields if this is a Addr::Proc, otherwise None
Sourcepub fn into_proc(self) -> Result<ProcAddr, Self>
pub fn into_proc(self) -> Result<ProcAddr, Self>
Returns the inner fields if this is a Addr::Proc, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_actor_mut(&mut self) -> Option<&mut ActorAddr>
pub fn as_actor_mut(&mut self) -> Option<&mut ActorAddr>
Optionally returns mutable references to the inner fields if this is a Addr::Actor, otherwise None
Sourcepub fn as_actor(&self) -> Option<&ActorAddr>
pub fn as_actor(&self) -> Option<&ActorAddr>
Optionally returns references to the inner fields if this is a Addr::Actor, otherwise None
Sourcepub fn into_actor(self) -> Result<ActorAddr, Self>
pub fn into_actor(self) -> Result<ActorAddr, Self>
Returns the inner fields if this is a Addr::Actor, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_port_mut(&mut self) -> Option<&mut PortAddr>
pub fn as_port_mut(&mut self) -> Option<&mut PortAddr>
Optionally returns mutable references to the inner fields if this is a Addr::Port, otherwise None
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Addr
impl<'de> Deserialize<'de> for Addr
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 Addr
impl Ord for Addr
Source§impl PartialOrd for Addr
impl PartialOrd for Addr
impl Eq for Addr
impl StructuralPartialEq for Addr
Auto Trait Implementations§
impl Freeze for Addr
impl RefUnwindSafe for Addr
impl Send for Addr
impl Sync for Addr
impl Unpin for Addr
impl UnsafeUnpin for Addr
impl UnwindSafe for Addr
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].