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

method Principal.isService

The caller is the service of cluster role name (or the node of that id).

Example:

oxl✓ проверяется в CI
fn main() io {
  let p = Principal.Service("billing-1", "billing,audit")
  print("{p.isService("audit")} {p.isService("web")}")
}
Вывод
true false
pub(api) fn isService(name: str) -> bool

Сложность. O(1).

С версии. 1.0.0-beta

Параметры

ИмяТип
namestr

Возвращает

bool

Эффекты

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

Определено в: std/core/rpc.oxl:156

См. также