Struct wasmbus_rpc::provider::HostBridge [−][src]
pub struct HostBridge { /* fields omitted */ }
Expand description
HostBridge manages the NATS connection to the host, and processes subscriptions for links, health-checks, and rpc messages. Callbacks from HostBridge are implemented by the provider in the [ProviderHandler] implementation.
Implementations
pub async fn send_actor(
&self,
origin: WasmCloudEntity,
actor_id: &str,
message: Message<'_>
) -> Result<Vec<u8>, RpcError>
pub async fn send_actor(
&self,
origin: WasmCloudEntity,
actor_id: &str,
message: Message<'_>
) -> Result<Vec<u8>, RpcError>
Sends an rpc message to the actor.
Stores actor with link definition
Deletes link
Returns copy of LinkDefinition, or None,if the actor is not linked
pub async fn connect<P>(
&'static self,
provider: P,
shutdown_tx: Sender<HostShutdownEvent>
) -> Result<JoinAll<JoinHandle<Result<(), RpcError>>>, RpcError> where
P: ProviderDispatch + Send + Sync + Clone + 'static,
pub async fn connect<P>(
&'static self,
provider: P,
shutdown_tx: Sender<HostShutdownEvent>
) -> Result<JoinAll<JoinHandle<Result<(), RpcError>>>, RpcError> where
P: ProviderDispatch + Send + Sync + Clone + 'static,
Implement subscriber listener threads and provider callbacks
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for HostBridge
impl Send for HostBridge
impl Sync for HostBridge
impl Unpin for HostBridge
impl !UnwindSafe for HostBridge
Blanket Implementations
Mutably borrows from an owned value. Read more