pub struct Recipient<P: Protocol> { /* private fields */ }Expand description
Pure established identity for one concrete destination protocol signature.
The destination protocol owner is part of the type even when two protocols
share the same address namespace and message type. A recipient proves the
static signature only; it does not prove that an executable
Behavior
has been installed at the address. The value contains no mailbox, endpoint,
registry entry, or other interpreter-owned capability.
Creator-local routes are deliberately a different type and cannot be smuggled into APIs that retain established recipients:
ⓘ
use behavior::{ChildRecipient, Delivery, MailAddr, Protocol};
struct Destination;
impl Protocol for Destination {
type Addr = MailAddr;
type Msg = u8;
}
let local = ChildRecipient::<Destination>::new(7);
let _ = Delivery::new(local, 1);Implementations§
Trait Implementations§
impl<P: Protocol> Copy for Recipient<P>
impl<P: Protocol> Eq for Recipient<P>
Auto Trait Implementations§
impl<P> Freeze for Recipient<P>
impl<P> RefUnwindSafe for Recipient<P>
impl<P> Send for Recipient<P>
impl<P> Sync for Recipient<P>
impl<P> Unpin for Recipient<P>
impl<P> UnsafeUnpin for Recipient<P>
impl<P> UnwindSafe for Recipient<P>
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
Mutably borrows from an owned value. Read more