pub struct SystemPath { /* private fields */ }Expand description
The part of an ActorPath that refers to the KompactSystem
As a URI, a SystemPath looks like "tcp://127.0.0.1:8080", for example.
Implementations§
Source§impl SystemPath
impl SystemPath
Sourcepub fn new(protocol: Transport, address: IpAddr, port: u16) -> SystemPath
pub fn new(protocol: Transport, address: IpAddr, port: u16) -> SystemPath
Construct a new system path from individual parts
Sourcepub fn with_socket(protocol: Transport, socket: SocketAddr) -> SystemPath
pub fn with_socket(protocol: Transport, socket: SocketAddr) -> SystemPath
Construct a new system path from individual parts using a SocketAddr
Sourcepub fn protocol(&self) -> Transport
pub fn protocol(&self) -> Transport
Returns a reference to the Transport protocol associated with with this system path
Sourcepub fn address(&self) -> &IpAddr
pub fn address(&self) -> &IpAddr
Returns a reference to the IP address associated with with this system path
Sourcepub fn into_named_with_string(
self,
path: &str,
) -> Result<NamedPath, PathParseError>
pub fn into_named_with_string( self, path: &str, ) -> Result<NamedPath, PathParseError>
Create a named path starting with this system path and ending with the given string
Paths created with this function will be validated to be a valid lookup path, and an error will be returned if they are not.
Sourcepub fn socket_address(&self) -> SocketAddr
pub fn socket_address(&self) -> SocketAddr
Returns the SocketAddr corresponding to the SystemPath
Sourcepub fn into_named_with_vec(
self,
path: Vec<String>,
) -> Result<NamedPath, PathParseError>
pub fn into_named_with_vec( self, path: Vec<String>, ) -> Result<NamedPath, PathParseError>
Create a named path starting with this system path and ending with the sequence of path segments
Paths created with this function will be validated to be a valid lookup path, and an error will be returned if they are not.
Sourcepub fn into_unique(self, id: Uuid) -> UniquePath
pub fn into_unique(self, id: Uuid) -> UniquePath
Create a unique path starting with this system path and ending with the given id
Trait Implementations§
Source§impl Clone for SystemPath
impl Clone for SystemPath
Source§fn clone(&self) -> SystemPath
fn clone(&self) -> SystemPath
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SystemPath
impl Debug for SystemPath
Source§impl Deserialiser<SystemPath> for SystemPath
impl Deserialiser<SystemPath> for SystemPath
Source§impl Display for SystemPath
impl Display for SystemPath
Source§impl Hash for SystemPath
impl Hash for SystemPath
Source§impl Ord for SystemPath
impl Ord for SystemPath
Source§fn cmp(&self, other: &SystemPath) -> Ordering
fn cmp(&self, other: &SystemPath) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SystemPath
impl PartialEq for SystemPath
Source§fn eq(&self, other: &SystemPath) -> bool
fn eq(&self, other: &SystemPath) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SystemPath
impl PartialOrd for SystemPath
Source§impl Serialisable for SystemPath
§Actor Path Serialization
An actor path is either Unique or Named and contains a SystemPath.
The SystemPath’s header disambiguates the type (Path type).
impl Serialisable for SystemPath
§Actor Path Serialization
An actor path is either Unique or Named and contains a SystemPath. The SystemPath’s header disambiguates the type (Path type).
§Unique Actor Paths
+---------------------------+
| System path (*) ...
+---------------+-----------+
| UUID (16 bytes) |
+---------------------------+§Named Actor Paths
+---------------------------+
| System path (*) ...
+---------------+-----------+-------------------------------+
| Named path (2 bytes prefix + variable length) ...
+-----------------------------------------------------------+§System Paths
+-------------------+-------------------+-----------------------+
| Path type (1 bit) | Protocol (5 bits) | Address Type (2 bits) |
+-------------------+-------------------+-----------------------+----------------+
| Address (4/16/ * bytes) ...| Port (2 bytes) |
+---------------------------------------------------------------+----------------+Source§fn size_hint(&self) -> Option<usize>
fn size_hint(&self) -> Option<usize>
Source§fn local(
self: Box<SystemPath>,
) -> Result<Box<dyn Any + Send>, Box<dyn Serialisable>>
fn local( self: Box<SystemPath>, ) -> Result<Box<dyn Any + Send>, Box<dyn Serialisable>>
Source§fn serialised(&self) -> Result<Serialised, SerError>
fn serialised(&self) -> Result<Serialised, SerError>
Source§impl SystemField for SystemPath
impl SystemField for SystemPath
Source§fn system(&self) -> &SystemPath
fn system(&self) -> &SystemPath
impl Eq for SystemPath
impl StructuralPartialEq for SystemPath
Auto Trait Implementations§
impl Freeze for SystemPath
impl RefUnwindSafe for SystemPath
impl Send for SystemPath
impl Sync for SystemPath
impl Unpin for SystemPath
impl UnsafeUnpin for SystemPath
impl UnwindSafe for SystemPath
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> DispatchEvent for T
impl<T> DispatchEvent for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.