pub struct Address {
pub node: NodeId,
pub process: ProcessId,
}Fields§
§node: NodeId§process: ProcessIdImplementations§
source§impl Address
impl Address
Address is defined in kinode.wit, but constructors and methods here.
An Address is a combination of a node ID (string) and a ProcessId. It is
used in the Request/Response pattern to indicate which process on a given node
in the network to direct the message to. The formatting structure for
an Address is node@process_name:package_name:publisher_node
sourcepub fn new<T, U>(node: T, process: U) -> Address
pub fn new<T, U>(node: T, process: U) -> Address
Create a new Address. Takes a node ID and a process ID.
sourcepub fn publisher(&self) -> &str
pub fn publisher(&self) -> &str
Read the publisher node ID from an Address. Note that Address
segments are not parsed for validity, and a node ID stored here is
not guaranteed to be a valid ID in the name system, or be connected
to an identity at all.
sourcepub fn package_id(&self) -> PackageId
pub fn package_id(&self) -> PackageId
Read the package_id (package + publisher) from an Address.
Trait Implementations§
source§impl<'a> Deserialize<'a> for Address
impl<'a> Deserialize<'a> for Address
source§fn deserialize<D>(deserializer: D) -> Result<Address, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Address, D::Error>where
D: Deserializer<'a>,
source§impl<T, U, V, W> From<(T, U, V, W)> for Address
impl<T, U, V, W> From<(T, U, V, W)> for Address
source§fn from(input: (T, U, V, W)) -> Self
fn from(input: (T, U, V, W)) -> Self
source§impl FromStr for Address
impl FromStr for Address
source§fn from_str(input: &str) -> Result<Self, AddressParseError>
fn from_str(input: &str) -> Result<Self, AddressParseError>
Attempt to parse an Address from a string. The formatting structure for
an Address is node@process_name:package_name:publisher_node.
The string being parsed must contain exactly one @ and three : characters.
The @ character separates the node ID from the rest of the address, and the
: characters separate the process name, package name, and publisher node ID.
source§type Err = AddressParseError
type Err = AddressParseError
impl Eq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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