#[non_exhaustive]pub struct SessionSetup<Link, Response>{
pub session: ActiveSession<Link>,
pub response: Response,
}Available on crate feature
unstable_protocol_v2 only.Expand description
A protocol v2 session and the response of the request that set it up.
Every setup method returns one: SessionBuilder::start_session
(session/new), ResumeSessionBuilder::start_session
(session/resume) and, with unstable_session_fork,
ForkSessionBuilder::start_session (session/fork), and their
on_proxy_session_start 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.
New fields may be added, so destructure with ..:
ⓘ
let SessionSetup { session, response, .. } = setup;Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session: ActiveSession<Link>The command handle for the session.
response: ResponseThe complete response of the request that set the session up.
Trait Implementations§
Auto Trait Implementations§
impl<Link, Response> !RefUnwindSafe for SessionSetup<Link, Response>
impl<Link, Response> !UnwindSafe for SessionSetup<Link, Response>
impl<Link, Response> Freeze for SessionSetup<Link, Response>
impl<Link, Response> Send for SessionSetup<Link, Response>
impl<Link, Response> Sync for SessionSetup<Link, Response>
impl<Link, Response> Unpin for SessionSetup<Link, Response>
impl<Link, Response> UnsafeUnpin for SessionSetup<Link, Response>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.