method Principal.service
The caller is the service of cluster role name (caller.service("billing"), §13.2).
Example:
fn main() io {
let billing = Principal.Service("billing-1", "billing")
print("{billing.service("billing")} {billing.service("web")}")
}Output
true false
pub(api) fn service(name: str) -> boolComplexity. O(1).
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
name | str |
Returns
bool
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/rpc.oxl:119