Struct oasis_core_runtime::enclave_rpc::client::RpcClient
source · pub struct RpcClient { /* private fields */ }
Expand description
RPC client.
Implementations§
source§impl RpcClient
impl RpcClient
sourcepub fn new_runtime(
builder: Builder,
protocol: Arc<Protocol>,
endpoint: &str,
nodes: Vec<PublicKey>
) -> Self
pub fn new_runtime( builder: Builder, protocol: Arc<Protocol>, endpoint: &str, nodes: Vec<PublicKey> ) -> Self
Construct an unconnected RPC client with runtime-internal transport.
sourcepub async fn secure_call<C, O>(
&self,
method: &'static str,
args: C
) -> Result<O, RpcClientError>where
C: Encode,
O: Decode + Send + 'static,
pub async fn secure_call<C, O>(
&self,
method: &'static str,
args: C
) -> Result<O, RpcClientError>where
C: Encode,
O: Decode + Send + 'static,
Call a remote method using an encrypted and authenticated Noise session.
sourcepub async fn insecure_call<C, O>(
&self,
method: &'static str,
args: C
) -> Result<O, RpcClientError>where
C: Encode,
O: Decode + Send + 'static,
pub async fn insecure_call<C, O>(
&self,
method: &'static str,
args: C
) -> Result<O, RpcClientError>where
C: Encode,
O: Decode + Send + 'static,
Call a remote method over an insecure channel where messages are sent in plain text.
sourcepub fn update_enclaves(&self, enclaves: Option<HashSet<EnclaveIdentity>>)
pub fn update_enclaves(&self, enclaves: Option<HashSet<EnclaveIdentity>>)
Update allowed remote enclave identities.
Useful if the key manager’s policy has changed.
§Panics
This function panics if called within an asynchronous execution context.
sourcepub fn update_quote_policy(&self, policy: QuotePolicy)
pub fn update_quote_policy(&self, policy: QuotePolicy)
Update key manager’s quote policy.
§Panics
This function panics if called within an asynchronous execution context.
sourcepub fn update_runtime_id(&self, id: Option<Namespace>)
pub fn update_runtime_id(&self, id: Option<Namespace>)
Update remote runtime id.
§Panics
This function panics if called within an asynchronous execution context.
sourcepub fn update_nodes(&self, nodes: Vec<PublicKey>)
pub fn update_nodes(&self, nodes: Vec<PublicKey>)
Update allowed nodes.
§Panics
This function panics if called within an asynchronous execution context.
Auto Trait Implementations§
impl !RefUnwindSafe for RpcClient
impl Send for RpcClient
impl Sync for RpcClient
impl Unpin for RpcClient
impl !UnwindSafe for RpcClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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