Struct wasmbus_rpc::RpcClientSync[][src]

pub struct RpcClientSync { /* fields omitted */ }

Implementations

Constructs a new synchronous RpcClient parameters: nats client connection, lattice rpc prefix (usually “default”), and secret key for signing messages

Send an rpc message using json-encoded data. Blocks the current thread until response is received.

Send an rpc message. Blocks the current thread until response is received.

Methods from Deref<Target = RpcClient>

convenience method for returning async client If the client is not the correct type, returns None

convenience method for returning nats::asynk Connection If the client is not the correct type, returns None

Send an rpc message using json-encoded data

Send a wasmbus rpc message by wrapping with an Invocation before sending over nats. ‘target’ may be &str or String for sending to an actor, or a WasmCloudEntity (for actor or provider) If nats client is sync, this can block the current thread. If a response is not received within the default timeout, the Error RpcError::Timeout is returned.

Send a wasmbus rpc message, with a timeout. The rpc message is wrapped with an Invocation before sending over nats. ‘target’ may be &str or String for sending to an actor, or a WasmCloudEntity (for actor or provider) If nats client is sync, this can block the current thread until either the response is received, or the timeout expires. If the timeout expires before the response is received, this returns Error RpcError::Timeout.

Send a nats message and wait for the response. This can be used for general nats messages, not just wasmbus actor/provider messages. If the nats client is sync, this can block the current thread

Send a nats message with no reply-to. Do not wait for a response. This can be used for general nats messages, not just wasmbus actor/provider messages.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.