pub struct SessionConfig {
pub host: ExpectedHost,
pub community_id: Option<CommunityId>,
pub binding: Option<Binding>,
pub accepted: Option<AcceptedState>,
pub rotations: Vec<SignedRootRotation>,
pub held_pair: Option<(SignedJson, SignedJson)>,
pub versions: VersionRange,
pub capabilities: Vec<String>,
pub text_budget: usize,
pub retry: RetryPolicy,
pub ack_every_frames: u32,
pub ack_every_ms: u64,
}Expand description
Everything a super::Session needs besides the transport.
Fields§
§host: ExpectedHostThe 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 (§4.3 rule 5).
rotations: Vec<SignedRootRotation>The full rotation chain from the genesis key, if the caller has it (§4.6).
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 (§6.2).
versions: VersionRangeThe versions offered in session.hello.
capabilities: Vec<String>The capabilities offered in session.hello.
text_budget: usizePer-message text budget for framing (§5.1), from the transport adapter.
retry: RetryPolicyRetry schedule (§7.3).
ack_every_frames: u32Ack after this many received frames (§10.5: at most 8).
ack_every_ms: u64Ack after this long while frames arrive (§10.5: at most 30 s).
Implementations§
Source§impl SessionConfig
impl SessionConfig
Sourcepub fn new(host: ExpectedHost, community_id: Option<CommunityId>) -> Self
pub fn new(host: ExpectedHost, community_id: Option<CommunityId>) -> Self
Defaults for host and community_id: version 1, frag, the §7.3 schedule and the
§10.5 ack cadence (8 frames / 30 s).
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more