pub struct EstablishedRecipient<P>{ /* private fields */ }Expand description
Inert capability for one exact protocol endpoint.
The endpoint type is selected by P::Addr, so P remains the only
protocol identity and ordinary domain types carry no endpoint parameter.
The endpoint has no direct accessor or send method. It crosses only an
explicit interpretation boundary. That boundary is public and therefore a
deliberate power-user authority boundary, not exclusive runtime authority.
ⓘ
#[derive(Clone, Copy, PartialEq, Eq)]
struct RuntimeAddr(u64);
impl behavior::Address for RuntimeAddr { type Nonce = u64; }
struct Worker;
impl behavior::Protocol for Worker { type Addr = RuntimeAddr; type Msg = (); }
#[derive(Clone)]
struct Endpoint;
impl behavior::RecipientAddress for RuntimeAddr {
type Established<P> = Endpoint where P: behavior::Protocol<Addr = Self>;
}
let recipient = behavior::EstablishedRecipient::<Worker>::issued(Endpoint);
let _endpoint = recipient.endpoint();Implementations§
Source§impl<P> EstablishedRecipient<P>
impl<P> EstablishedRecipient<P>
Sourcepub const fn issued(
endpoint: <P::Addr as RecipientAddress>::Established<P>,
) -> Self
pub const fn issued( endpoint: <P::Addr as RecipientAddress>::Established<P>, ) -> Self
Issue a capability from an exact endpoint established or imported by an interpreter.
This constructor performs no allocation or validation. It proves only protocol messaging; it never establishes a concrete behavior or lifecycle authority.
Sourcepub fn interpret<I>(self, interpreter: &mut I) -> I::Outputwhere
I: InterpretEstablished<P>,
pub fn interpret<I>(self, interpreter: &mut I) -> I::Outputwhere
I: InterpretEstablished<P>,
Transfer the endpoint through an explicit interpretation boundary.
Trait Implementations§
Source§impl<P> Clone for EstablishedRecipient<P>
impl<P> Clone for EstablishedRecipient<P>
Source§impl<P> Debug for EstablishedRecipient<P>
impl<P> Debug for EstablishedRecipient<P>
Source§impl<P> PartialEq for EstablishedRecipient<P>where
P: Protocol,
P::Addr: RecipientAddress,
<P::Addr as RecipientAddress>::Established<P>: PartialEq,
impl<P> PartialEq for EstablishedRecipient<P>where
P: Protocol,
P::Addr: RecipientAddress,
<P::Addr as RecipientAddress>::Established<P>: PartialEq,
impl<P> Eq for EstablishedRecipient<P>
Auto Trait Implementations§
impl<P> Freeze for EstablishedRecipient<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: Freeze,
impl<P> RefUnwindSafe for EstablishedRecipient<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: RefUnwindSafe,
impl<P> Send for EstablishedRecipient<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: Send,
impl<P> Sync for EstablishedRecipient<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: Sync,
impl<P> Unpin for EstablishedRecipient<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: Unpin,
impl<P> UnsafeUnpin for EstablishedRecipient<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: UnsafeUnpin,
impl<P> UnwindSafe for EstablishedRecipient<P>where
<P as Protocol>::Addr: Sized,
<<P as Protocol>::Addr as RecipientAddress>::Established<P>: UnwindSafe,
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