Enum ActorPath

Source
pub enum ActorPath {
    Local(String),
    Distant(ConnectionInfo),
}
Expand description

Path to an actor.

This enum contains the information for actors whether they are local or distant.

Variants§

§

Local(String)

Logical path to a local actor.

§

Distant(ConnectionInfo)

Logical path and connection information for a distant actor.

Implementations§

Source§

impl ActorPath

Source

pub fn new_local(path: String) -> Arc<ActorPath>

Creates a new local ActorPath variant with the given logical_path.

Source

pub fn new_distant( distant_logical_path: String, addr_port: String, ) -> Arc<ActorPath>

Creates a new distant ActorPath.

Source

pub fn logical_path(&self) -> &String

Gives a reference to the logical path of an actor.

Note that this gives the local logical path whether the actor is local or not.

Source

pub fn child(&self, name: String) -> Arc<ActorPath>

Creates an ActorPath for a child of an actor.

This gives a Local variant, because actors are always created locally.

Trait Implementations§

Source§

impl Debug for ActorPath

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for ActorPath

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ActorPath

Source§

fn eq(&self, other: &ActorPath) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ActorPath

Source§

impl StructuralPartialEq for ActorPath

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.