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

# Struct Poseidon2Hasher

Module: `poseidon::poseidon2`

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

## Trait implementations

```rust
impl Default for Poseidon2Hasher
```

```rust
pub fn default() -> Self
```

```rust
impl Hasher for Poseidon2Hasher
```

```rust
pub fn finish(self) -> Field
```

```rust
pub fn finish_ref(&self: &Self) -> Field
```

Returns the hash value without consuming the hasher. Override this for more efficient implementations that avoid copying. TODO: deprecate finish() and replace it

```rust
pub fn write(&mut self, input: Field)
```
