# Enum crypto::voice::VoiceError

> A voice key or frame operation failed.

`zaun_community_protocol::crypto::voice::VoiceError` · Enum

```rust
pub enum VoiceError { … }
```

A voice key or frame operation failed.

## Variants

### `Rng`

The OS CSPRNG failed.

### `Encode(EncodeError)`

A value breaks an encoding rule.

### `Decode(DecodeError)`

Bytes are not a canonical encoding.

### `Signed(SignedError)`

A member signature does not verify, or signing failed.

### `Length(&'static str)`

The input has the wrong length.

### `UnknownSuite(u8)`

The voice suite is not one this implementation knows.

### `PublicKey`

The X-Wing public key is invalid.

### `Mismatch(&'static str)`

A signed field does not match what the verifier expects.

### `Unwrap`

HPKE failed: the wrapped key was not made for this recipient or was altered.

### `WrappedHash`

The wrapped key's hash is not the one the sender signed for this recipient.

### `NotARecipient`

The sender-keys message does not name this recipient.

### `Recipients`

More recipients than `super::MAX_RECIPIENTS`, or the same one twice.

### `StaleEpoch`

An epoch that is not newer than the one in use.

### `Exhausted`

The sender has used every epoch or counter of this voice session; rejoin.

### `Header`

The SFrame header is malformed or not minimally encoded.

### `UnknownKid`

No key for the frame's KID.

### `Replay`

The frame's counter was already seen or is older than the replay window.

### `Open`

The frame does not authenticate.

### `KidCollision`

Two participants' KIDs collide; the newer one rejoins with a new voice session.

### `UnknownPeer`

The participant is not known (no verified key package).

### `NoSenderKey`

No sender key is active yet.

## Trait implementations

`Clone`, `Copy`, `Debug`, `Display`, `Eq`, `Error`, `From<DecodeError>`, `From<EncodeError>`, `From<RngError>`, `From<SignedError>`, `PartialEq`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/crypto/voice/error/enum.VoiceError.html)
