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

# Struct ReturnsHash

Module: `noir_aztec::context`

```rust
pub struct ReturnsHash
{ /* private fields */ }
```

The hash of a private contract function call's return value.

Use [`ReturnsHash::get_preimage`](/aztec-nr-api/mainnet/noir_aztec/context/struct.ReturnsHash.md#get_preimage) to get the underlying value.

The kernels don't process the actual return values but instead their hashes, so it is up to contracts to populate oracles with the preimages of these hashes on return to make them available to their callers.

Public calls don't utilize this mechanism since the AVM does process the full return values.

## Implementations

```rust
impl ReturnsHash
```

```rust
pub fn new(hash: Field) -> Self
```

```rust
pub fn get_preimage<T>(self) -> T
where
    T: Deserialize
```

Fetches the underlying return value from an oracle, constraining that it corresponds to the return data hash.
