method ClusterApi.shards
The shard groups of the cluster: database, index, leader, replicas (§12.4, §12.6). Empty outside a cluster.
Example:
fn main() io {
print("{cluster.shards().len()}")
}Вывод
0
pub(api) fn shards() -> List<ShardInfo>Сложность. O(s) in the number of shard groups.
С версии. 1.0.0-beta
Возвращает
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/node.oxl:384