method Principal.isService
The caller is the service of cluster role name (or the node of that id).
Example:
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
Параметры
| Имя | Тип |
|---|---|
name | str |
Возвращает
bool
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/rpc.oxl:156