Skip to content

Commit 2c76f0c

Browse files
committed
ClusterState: Document token calculation methods
1 parent dbc4a13 commit 2c76f0c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

scylla/src/cluster/state.rs

+12
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ impl ClusterState {
198198
}
199199

200200
/// Compute token of a table partition key
201+
///
202+
/// `partition_key` argument contains the values of all partition key
203+
/// columns. You can use both unnamed values like a tuple (e.g. `(1, 5, 5)`)
204+
/// or named values (e.g. struct that derives `SerializeRow`), as you would
205+
/// when executing a request. No additional values are allowed besides values
206+
/// for primary key columns.
201207
pub fn compute_token(
202208
&self,
203209
keyspace: &str,
@@ -257,6 +263,12 @@ impl ClusterState {
257263
}
258264

259265
/// Access to replicas owning a given partition key (similar to `nodetool getendpoints`)
266+
///
267+
/// `partition_key` argument contains the values of all partition key
268+
/// columns. You can use both unnamed values like a tuple (e.g. `(1, 5, 5)`)
269+
/// or named values (e.g. struct that derives `SerializeRow`), as you would
270+
/// when executing a request. No additional values are allowed besides values
271+
/// for primary key columns.
260272
pub fn get_endpoints(
261273
&self,
262274
keyspace: &str,

0 commit comments

Comments
 (0)