OxL Справочник OxL
РусскийEnglish

method ClusterApi.shards

The shard groups of the cluster: database, index, leader, replicas (§12.4, §12.6). Empty outside a cluster.

Example:

oxl✓ проверяется в CI
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

Возвращает

List<ShardInfo>

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/node.oxl:384

См. также