#[non_exhaustive]pub struct SessionSetup<'runner, Link, Response>{
pub session: ActiveSession<'runner, Link>,
pub response: Response,
}Expand description
A stable protocol v1 session and the response of the request that set it up.
Every setup method returns one: SessionBuilder::start_session
(session/new), and start_session on LoadSessionBuilder
(session/load) and ResumeSessionBuilder (session/resume). The on_session_start and
run_until callbacks receive one too. The
response is the complete, operation-specific setup response; it is kept
next to the session rather than inside ActiveSession, so the setup
response lives in the same place for every setup method. For load and
resume, the session ID comes from the request, because stable v1 restore
responses do not repeat it.
New fields may be added, so destructure with ..:
let SessionSetup { mut session, response, .. } = builder.start_session().await?;Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session: ActiveSession<'runner, Link>The session, with its update stream.
response: ResponseThe complete response of the request that set the session up.