Skip to main content

Endpoint

Trait Endpoint 

Source
pub trait Endpoint<M>: Sealed {
    // Required methods
    fn endpoint_location(&self) -> EndpointLocation;
    fn post<C>(self, cx: &C, message: M)
       where C: Actor;
}
Expand description

A typed endpoint that can receive M.

This trait abstracts over local actor handles, local port handles, remote actor refs, remote port refs, and one-shot ports. It is sealed so that Hyperactor owns the post semantics for each endpoint kind.

Required Methods§

Source

fn endpoint_location(&self) -> EndpointLocation

The logical location of this endpoint.

Source

fn post<C>(self, cx: &C, message: M)
where C: Actor,

Post message to this endpoint from cx.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A, M> Endpoint<M> for &ActorHandle<A>
where A: Actor + Handler<M>, M: Message,

Source§

impl<A, M> Endpoint<M> for &ActorRef<A>

Source§

impl<A, M> Endpoint<M> for &Context<'_, A>
where A: Actor + Handler<M>, M: Message,

Source§

impl<A, M> Endpoint<M> for &Instance<A>
where A: Actor + Handler<M>, M: Message,

Source§

impl<A, M> Endpoint<M> for Instance<A>
where A: Actor + Handler<M>, M: Message,

Source§

impl<M> Endpoint<M> for &IdleFlushPortRef<M>
where M: RemoteMessage,

Source§

impl<M> Endpoint<M> for &PortHandle<M>
where M: Message,

Source§

impl<M> Endpoint<M> for &PortRef<M>
where M: RemoteMessage,

Source§

impl<M> Endpoint<M> for OncePortHandle<M>
where M: Message,

Source§

impl<M> Endpoint<M> for OncePortRef<M>
where M: RemoteMessage,