Struct client::SessionConfig
zaun_community_protocol::client::SessionConfig · Struct
pub struct SessionConfig { … }Everything a super::Session needs besides the transport.
Fields
Section titled “Fields”host: ExpectedHost
Section titled “host: ExpectedHost”The host the welcome must come from.
community_id: Option<CommunityId>
Section titled “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>
Section titled “binding: Option<Binding>”The connection’s binding from an earlier session, if any (restart persistence).
accepted: Option<AcceptedState>
Section titled “accepted: Option<AcceptedState>”The caller’s stored anti-rollback state for the community.
rotations: Vec<SignedRootRotation>
Section titled “rotations: Vec<SignedRootRotation>”The full rotation chain from the genesis key, if the caller has it.
held_pair: Option<(SignedJson, SignedJson)>
Section titled “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
Section titled “versions: VersionRange”The versions offered in session.hello.
capabilities: Vec<String>
Section titled “capabilities: Vec<String>”The capabilities offered in session.hello.
text_budget: usize
Section titled “text_budget: usize”Per-message text budget for framing, from the transport adapter.
retry: RetryPolicy
Section titled “retry: RetryPolicy”Retry schedule.
ack_every_frames: u32
Section titled “ack_every_frames: u32”Ack after this many received frames.
ack_every_ms: u64
Section titled “ack_every_ms: u64”Ack after this long while frames arrive.
Methods
Section titled “Methods”pub fn new(host: ExpectedHost, community_id: Option<CommunityId>) -> SelfDefaults for host and community_id: version 1, frag, the the protocol schedule and the
the protocol ack cadence (8 frames / 30 s).
Trait implementations
Section titled “Trait implementations”Clone, Debug