pub struct NatsProvider { /* private fields */ }Expand description
NATS implementation of the wasmcloud:messaging specification
Implementations§
Source§impl NatsProvider
impl NatsProvider
Sourcepub fn new() -> NatsProvider
pub fn new() -> NatsProvider
Creates a new NATS provider. This is either invoked manually in static plugin mode, or invoked by the host during dynamic loading
Trait Implementations§
Source§impl CapabilityProvider for NatsProvider
impl CapabilityProvider for NatsProvider
Source§fn configure_dispatch(
&self,
dispatcher: Box<dyn Dispatcher>,
) -> Result<(), Box<dyn Error + Sync + Send>>
fn configure_dispatch( &self, dispatcher: Box<dyn Dispatcher>, ) -> Result<(), Box<dyn Error + Sync + Send>>
Receives a dispatcher from the host runtime
Source§fn handle_call(
&self,
actor: &str,
op: &str,
msg: &[u8],
) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>
fn handle_call( &self, actor: &str, op: &str, msg: &[u8], ) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>
Handles an invocation received from the host runtime
Source§fn stop(&self)
fn stop(&self)
This function is called to let the capability provider know that it is being removed
from the host runtime. This gives the provider an opportunity to clean up any
resources and stop any running threads.
WARNING: do not do anything in this function that can
cause a panic, including attempting to write to STDOUT while the host process is terminating
Source§impl Clone for NatsProvider
impl Clone for NatsProvider
Source§fn clone(&self) -> NatsProvider
fn clone(&self) -> NatsProvider
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NatsProvider
impl RefUnwindSafe for NatsProvider
impl Send for NatsProvider
impl Sync for NatsProvider
impl Unpin for NatsProvider
impl UnwindSafe for NatsProvider
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