method ClusterApi.nodes
All nodes the membership knows, this one included (§12.3); dead and departed ones stay listed for a while with their state. Only this node outside a cluster.
Example:
fn main() io {
print("{cluster.nodes().len()}")
}Вывод
1
pub(api) fn nodes() -> List<ClusterMember>Сложность. O(n) in the number of nodes.
С версии. 1.0.0-beta
Возвращает
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/node.oxl:299