txt: ## trusting.md
  role Metamodel::Trusting
  
  Metaobject that supports trust relations between types
  
  ```raku
  role Metamodel::Trusting is SuperClass { ... }
  
  ```
  
  *Warning*: this role is part of the Rakudo implementation, and is not a part of the language specification.
  
  Normally, code in a class or role can only access its own private methods. If another type declares that it trusts that first class, then access to private methods of that second type is possible. `Metamodel::Trusting` implements that aspect of the Raku object system.
  
  ```raku
  class A {
      my class B {
          trusts A;   # that's where Metamodel::Trusting comes in
          method !private_method() {
              say "Private method in B";
          }
      }
      method build-and-poke {
          # call a private method from B
          # disallowed if A doesn't trust B
          B.new()!B::private_method();
      }
  };
  
  A.build-and-poke;   # Private method in B
  ```
  
  # [Methods](#role_Metamodel::Trusting "go to top of document")[§](#Methods "direct link")
  
  ## [method add\_trustee](#role_Metamodel::Trusting "go to top of document")[§](#method_add_trustee "direct link")
  
  ```raku
  method add_trustee($type, Mu $trustee)
  ```
  
  Trust `$trustee`.
  
  ```raku
  class A {
      BEGIN A.^add_trustee(B);
      # same as 'trusts B';
  }
  
  ```
  
  ## [method trusts](#role_Metamodel::Trusting "go to top of document")[§](#method_trusts "direct link")
  
  ```raku
  method trusts($type --> List)
  ```
  
  Returns a list of types that the invocant trusts.
  
  ```raku
  class A { trusts Int; };
  say .^name for A.^trusts;       # Int
  ```
  
  ## [method is\_trusted](#role_Metamodel::Trusting "go to top of document")[§](#method_is_trusted "direct link")
  
  ```raku
  method is_trusted($type, $claimant)
  ```
  
  Returns 1 if `$type` trusts `$claimant`, and 0 otherwise. Types always trust themselves.
  