pub enum Port {
Ephemeral(u64),
Handler(Uid),
Control(ControlPort),
}Expand description
A port identifier within an actor.
Variants§
Ephemeral(u64)
Ephemeral ports, indexed starting at 0.
Handler(Uid)
Handler ports, indexed by uid. The label usually carries the type name.
Control(ControlPort)
Control ports.
Implementations§
Source§impl Port
impl Port
Sourcepub fn is_ephemeral(&self) -> bool
pub fn is_ephemeral(&self) -> bool
Returns true if this is a Port::Ephemeral, otherwise false
Sourcepub fn as_ephemeral_mut(&mut self) -> Option<&mut u64>
pub fn as_ephemeral_mut(&mut self) -> Option<&mut u64>
Optionally returns mutable references to the inner fields if this is a Port::Ephemeral, otherwise None
Sourcepub fn as_ephemeral(&self) -> Option<&u64>
pub fn as_ephemeral(&self) -> Option<&u64>
Optionally returns references to the inner fields if this is a Port::Ephemeral, otherwise None
Sourcepub fn into_ephemeral(self) -> Result<u64, Self>
pub fn into_ephemeral(self) -> Result<u64, Self>
Returns the inner fields if this is a Port::Ephemeral, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_handler(&self) -> bool
pub fn is_handler(&self) -> bool
Returns true if this is a Port::Handler, otherwise false
Sourcepub fn as_handler_mut(&mut self) -> Option<&mut Uid>
pub fn as_handler_mut(&mut self) -> Option<&mut Uid>
Optionally returns mutable references to the inner fields if this is a Port::Handler, otherwise None
Sourcepub fn as_handler(&self) -> Option<&Uid>
pub fn as_handler(&self) -> Option<&Uid>
Optionally returns references to the inner fields if this is a Port::Handler, otherwise None
Sourcepub fn into_handler(self) -> Result<Uid, Self>
pub fn into_handler(self) -> Result<Uid, Self>
Returns the inner fields if this is a Port::Handler, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_control(&self) -> bool
pub fn is_control(&self) -> bool
Returns true if this is a Port::Control, otherwise false
Sourcepub fn as_control_mut(&mut self) -> Option<&mut ControlPort>
pub fn as_control_mut(&mut self) -> Option<&mut ControlPort>
Optionally returns mutable references to the inner fields if this is a Port::Control, otherwise None
Sourcepub fn as_control(&self) -> Option<&ControlPort>
pub fn as_control(&self) -> Option<&ControlPort>
Optionally returns references to the inner fields if this is a Port::Control, otherwise None
Sourcepub fn into_control(self) -> Result<ControlPort, Self>
pub fn into_control(self) -> Result<ControlPort, Self>
Returns the inner fields if this is a Port::Control, otherwise returns back the enum in the Err case of the result
Source§impl Port
impl Port
Sourcepub fn handler_id(typehash: u64, label: Option<Label>) -> Self
pub fn handler_id(typehash: u64, label: Option<Label>) -> Self
Create a handler port from a type hash and optional display label.
Sourcepub fn control(port: ControlPort) -> Self
pub fn control(port: ControlPort) -> Self
Create a control port.
Sourcepub fn ephemeral_index(&self) -> Option<u64>
pub fn ephemeral_index(&self) -> Option<u64>
The ephemeral port index, if this is an ephemeral port.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Port
impl<'de> Deserialize<'de> for Port
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 Port
impl Ord for Port
Source§impl PartialOrd for Port
impl PartialOrd for Port
impl Eq for Port
impl StructuralPartialEq for Port
Auto Trait Implementations§
impl Freeze for Port
impl RefUnwindSafe for Port
impl Send for Port
impl Sync for Port
impl Unpin for Port
impl UnsafeUnpin for Port
impl UnwindSafe for Port
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
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>
§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].