# Struct client::SessionConfig

> Everything a `super::Session` needs besides the transport.

`zaun_community_protocol::client::SessionConfig` · Struct

```rust
pub struct SessionConfig { … }
```

Everything a `super::Session` needs besides the transport.

## Fields

### `host: ExpectedHost`

The host the welcome must come from.

### `community_id: Option<CommunityId>`

The community the host must prove (invitation target, or the bound community).
`None` only for an unbound connection with no target (before `community.create`).

### `binding: Option<Binding>`

The connection's binding from an earlier session, if any (restart persistence).

### `accepted: Option<AcceptedState>`

The caller's stored anti-rollback state for the community.

### `rotations: Vec<SignedRootRotation>`

The full rotation chain from the genesis key, if the caller has it.

### `held_pair: Option<(SignedJson, SignedJson)>`

The signed descriptor and delegation of the community, as verified before (a stored
`crate::signed::ValidPair`): the hello names it and the host may leave it out of the
welcome; it is then verified again as if the host had sent it.

### `versions: VersionRange`

The versions offered in `session.hello`.

### `capabilities: Vec<String>`

The capabilities offered in `session.hello`.

### `text_budget: usize`

Per-message text budget for framing, from the transport adapter.

### `retry: RetryPolicy`

Retry schedule.

### `ack_every_frames: u32`

Ack after this many received frames.

### `ack_every_ms: u64`

Ack after this long while frames arrive.

## Methods

### `new`

```rust
pub fn new(host: ExpectedHost, community_id: Option<CommunityId>) -> Self
```

Defaults for `host` and `community_id`: version 1, `frag`, the the protocol schedule and the
the protocol ack cadence (8 frames / 30 s).

## Trait implementations

`Clone`, `Debug`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/client/config/struct.SessionConfig.html)
