circles_rpc/methods/tables.rs
1use crate::client::RpcClient;
2use crate::error::Result;
3use circles_types::TableInfo;
4
5/// Methods for table/schema introspection (`circles_tables`).
6#[derive(Clone, Debug)]
7pub struct TablesMethods {
8 client: RpcClient,
9}
10
11impl TablesMethods {
12 /// Create a new accessor for table listing RPCs.
13 pub fn new(client: RpcClient) -> Self {
14 Self { client }
15 }
16
17 /// circles_tables
18 pub async fn tables(&self) -> Result<Vec<TableInfo>> {
19 self.client.call("circles_tables", ()).await
20 }
21}