canic_dsl/access/
caller.rs1#[derive(Clone, Copy, Debug)]
6pub struct IsController;
7
8#[derive(Clone, Copy, Debug)]
13pub struct IsParent;
14
15#[derive(Clone, Copy, Debug)]
20pub struct IsChild;
21
22#[derive(Clone, Copy, Debug)]
27pub struct IsRoot;
28
29#[derive(Clone, Copy, Debug)]
34pub struct IsSameCanister;
35
36#[derive(Clone, Copy, Debug)]
41pub struct IsRegisteredToSubnet;
42
43#[derive(Clone, Copy, Debug)]
48pub struct IsWhitelisted;
49
50#[must_use]
51pub const fn is_controller() -> IsController {
52 IsController
53}
54
55#[must_use]
56pub const fn is_parent() -> IsParent {
57 IsParent
58}
59
60#[must_use]
61pub const fn is_child() -> IsChild {
62 IsChild
63}
64
65#[must_use]
66pub const fn is_root() -> IsRoot {
67 IsRoot
68}
69
70#[must_use]
71pub const fn is_same_canister() -> IsSameCanister {
72 IsSameCanister
73}
74
75#[must_use]
76pub const fn is_registered_to_subnet() -> IsRegisteredToSubnet {
77 IsRegisteredToSubnet
78}
79
80#[must_use]
81pub const fn is_whitelisted() -> IsWhitelisted {
82 IsWhitelisted
83}