---
title: "RPC"
description: "This page lists the Rust SDK names for RPCs."
canonical_url: "https://docs.superdurable.io/reference/rust/rpc/"
source: "docs/reference/rust/rpc.mdx"
locale: "en"
---

# RPC

This page lists the Rust SDK names for [RPCs](https://docs.superdurable.io/concepts/primitives/rpc.md).
The doc comment of each API gives its parameters, defaults, and errors. Read
them in the [Rust SDK API reference](https://docs.superdurable.io/reference/rust.md#api-reference).

<a id="api-names"></a>

## API names

| Task                                                 | Rust API                                                                                                                                                | Dex behavior                                                                                                                   |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Define an RPC handler                                | **Rpc**, bound to a Flow method with **RpcList::function**, **function_without_input**, **procedure**, or **procedure_without_input** in **Flow::rpcs** | [Flow definition](https://docs.superdurable.io/reference/rust/flow.md#flow-definition)                                         |
| Set the durable RPC name                             | The name argument of **Rpc::new**. It has no default.                                                                                                   | [Flow definition](https://docs.superdurable.io/reference/rust/flow.md#flow-definition)                                         |
| Set the RPC timeout                                  | **timeout** of **Rpc**                                                                                                                                  | [RPC timeout](https://docs.superdurable.io/reference/server/runtime-data.md#rpc-timeout)                                       |
| Lock Attributes for the whole call                   | **lock** of **Rpc**                                                                                                                                     | [Locks](https://docs.superdurable.io/reference/server/runtime-data.md#attribute-locks)                                         |
| Request transactional reads and writes without locks | **is_transactional** of **Rpc**                                                                                                                         | [Transactional RPCs](https://docs.superdurable.io/reference/server/runtime-data.md#transactional-reads-and-writes)             |
| Load AttributeMap values and Channel messages        | **load_attribute_map**, **load_attribute_map_instance**, **load_channel**, **load_channel_map**, and **load_channel_map_instance** of **Rpc**           | [Selective state loading](https://docs.superdurable.io/reference/server/runtime-data.md#load-collection-state)                 |
| Return the output and start next Steps               | **RpcResult**, with **RpcResult::then**                                                                                                                 | [RPCs](https://docs.superdurable.io/reference/server/runtime-data.md#rpcs)                                                     |
| Cancel running Steps                                 | **RpcResult::cancel_step**                                                                                                                              | [Cancel running Steps](https://docs.superdurable.io/reference/server/runtime-data.md#cancel-running-steps)                     |
| Let a person invoke the RPC from Dex Web             | Not available in the Rust SDK.                                                                                                                          | [Actions](https://docs.superdurable.io/reference/web/dex-web.md#actions)                                                       |
| Invoke the RPC from a Client                         | **Client::invoke_rpc** and **Client::invoke_rpc_without_input**                                                                                         | [Invoke an RPC](https://docs.superdurable.io/reference/server/runtime-client.md#invoke-an-rpc)                                 |
| Lock or load map instances chosen at call time       | **RpcInvokeOptions**, with **Client::invoke_rpc_with_options**                                                                                          | [Runtime-selected map instances](https://docs.superdurable.io/reference/server/runtime-data.md#runtime-selected-map-instances) |

<a id="example"></a>

## Example

Example: [examples/rust/src/primitives/rpc/flow.rs](https://github.com/superdurable/dex/tree/main/examples/rust/src/primitives/rpc/flow.rs)
