> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Struct PrivateUtilityCalls

Module: `noir_aztec::contract_self::contract_self_private`

```rust
pub struct PrivateUtilityCalls<CallSelf> {
    pub call_self: CallSelf,
}
```

A struct that allows for ergonomic calling of utility functions from a private context.

Accessible via `self.utility` in private functions. Results are not part of any circuit proof; use them to inform logic, not as inputs to constrained assertions.

## Type Parameters

- `CallSelf`: Macro-generated type for calling the contract's own utility functions (same type as `CallSelf` in \[`ContractSelfUtility`])

## Fields

```rust
call_self: CallSelf
```

Provides type-safe methods for calling this contract's own utility functions.

Example API:

```rust
// Safety: result is unconstrained
unsafe { self.utility.call_self.some_utility_function(args) }
```

## Implementations

```rust
impl<CallSelf> PrivateUtilityCalls<CallSelf>
```

```rust
pub unconstrained fn call<let M: u32, let N: u32, T>(
    _self: Self,
    call: UtilityCall<M, N, T>,
) -> T
where
    T: Deserialize
```

Makes a utility contract call from a private function.

The call executes unconstrained code, so it must be wrapped in `unsafe`, and its result is not part of any circuit proof: use it to inform logic, never as an input to a constrained assertion without validating it first.

The callee observes this contract's address as its `msg_sender`: see the `msg_sender` docs on [`ContractSelfUtility`](/aztec-nr-api/v6.0.0/noir_aztec/contract_self/contract_self_utility/struct.ContractSelfUtility.md).

To call one of this contract's own utility functions, prefer the type-safe `self.utility.call_self` stubs.

#### Authorization

A call to this contract itself always succeeds. A call to a different contract can expose that contract's private state to the caller, so it requires explicit authorization. A call that is not authorized fails.

#### Example

```rust
// Safety: result is unconstrained
unsafe { self.utility.call(Token::at(address).get_balance_of(owner)) }
```
