# Struct crypto::voice::Header

> An SFrame header (RFC 9605 the protocol).

`zaun_community_protocol::crypto::voice::Header` · Struct

```rust
pub struct Header { … }
```

An SFrame header (RFC 9605 the protocol).

## Fields

### `kid: u64`

The key id.

### `ctr: u64`

The counter.

## Methods

### `encode_into`

```rust
pub fn encode_into(&self, out: &mut Vec<u8>)
```

Appends the minimal encoding.

### `to_bytes`

```rust
pub fn to_bytes(&self) -> Vec<u8>
```

The minimal encoding.

### `parse`

```rust
pub fn parse(frame: &[u8]) -> Result<(Self, usize), VoiceError>
```

Parses the header at the start of `frame`; returns it and its length. Non-minimal
encodings are rejected, so each header has exactly one encoding.

# Errors
`VoiceError::Header`.

## Trait implementations

`Clone`, `Copy`, `Debug`, `Eq`, `PartialEq`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/crypto/voice/sframe/struct.Header.html)
