pub struct TypedSession<Transport, Phase, Cleanliness = ()> { /* private fields */ }Expand description
Transport-carrying typestate for this protocol role.
Implementations§
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Startup, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Startup, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: StartupInternalMessage,
) -> StartupInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: StartupInternalMessage, ) -> StartupInternalProjection<Transport, SourceCleanliness>
Projects one StartupInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Startup, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Startup, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: StartupExternalMessage,
) -> StartupExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: StartupExternalMessage, ) -> StartupExternalProjection<Transport, SourceCleanliness>
Projects one StartupExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Auth, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Auth, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: AuthInternalMessage,
) -> AuthInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: AuthInternalMessage, ) -> AuthInternalProjection<Transport, SourceCleanliness>
Projects one AuthInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Auth, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Auth, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: AuthExternalMessage,
) -> AuthExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: AuthExternalMessage, ) -> AuthExternalProjection<Transport, SourceCleanliness>
Projects one AuthExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, PasswordResponse, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, PasswordResponse, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: PasswordResponseInternalMessage,
) -> PasswordResponseInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: PasswordResponseInternalMessage, ) -> PasswordResponseInternalProjection<Transport, SourceCleanliness>
Projects one PasswordResponseInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, PasswordResponse, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, PasswordResponse, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: PasswordResponseExternalMessage,
) -> PasswordResponseExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: PasswordResponseExternalMessage, ) -> PasswordResponseExternalProjection<Transport, SourceCleanliness>
Projects one PasswordResponseExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, SaslInitial, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, SaslInitial, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: SaslInitialInternalMessage,
) -> SaslInitialInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: SaslInitialInternalMessage, ) -> SaslInitialInternalProjection<Transport, SourceCleanliness>
Projects one SaslInitialInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, SaslInitial, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, SaslInitial, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: SaslInitialExternalMessage,
) -> SaslInitialExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: SaslInitialExternalMessage, ) -> SaslInitialExternalProjection<Transport, SourceCleanliness>
Projects one SaslInitialExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Sasl, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Sasl, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: SaslInternalMessage,
) -> SaslInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: SaslInternalMessage, ) -> SaslInternalProjection<Transport, SourceCleanliness>
Projects one SaslInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Sasl, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Sasl, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: SaslExternalMessage,
) -> SaslExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: SaslExternalMessage, ) -> SaslExternalProjection<Transport, SourceCleanliness>
Projects one SaslExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, SaslResponse, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, SaslResponse, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: SaslResponseInternalMessage,
) -> SaslResponseInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: SaslResponseInternalMessage, ) -> SaslResponseInternalProjection<Transport, SourceCleanliness>
Projects one SaslResponseInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, SaslResponse, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, SaslResponse, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: SaslResponseExternalMessage,
) -> SaslResponseExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: SaslResponseExternalMessage, ) -> SaslResponseExternalProjection<Transport, SourceCleanliness>
Projects one SaslResponseExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, TokenResponse, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, TokenResponse, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: TokenResponseInternalMessage,
) -> TokenResponseInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: TokenResponseInternalMessage, ) -> TokenResponseInternalProjection<Transport, SourceCleanliness>
Projects one TokenResponseInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, TokenResponse, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, TokenResponse, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: TokenResponseExternalMessage,
) -> TokenResponseExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: TokenResponseExternalMessage, ) -> TokenResponseExternalProjection<Transport, SourceCleanliness>
Projects one TokenResponseExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, TokenPolicy, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, TokenPolicy, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: TokenPolicyInternalMessage,
) -> TokenPolicyInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: TokenPolicyInternalMessage, ) -> TokenPolicyInternalProjection<Transport, SourceCleanliness>
Projects one TokenPolicyInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, TokenPolicy, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, TokenPolicy, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: TokenPolicyExternalMessage,
) -> TokenPolicyExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: TokenPolicyExternalMessage, ) -> TokenPolicyExternalProjection<Transport, SourceCleanliness>
Projects one TokenPolicyExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, StartupReady, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, StartupReady, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: StartupReadyInternalMessage,
) -> StartupReadyInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: StartupReadyInternalMessage, ) -> StartupReadyInternalProjection<Transport, SourceCleanliness>
Projects one StartupReadyInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, StartupReady, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, StartupReady, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: StartupReadyExternalMessage,
) -> StartupReadyExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: StartupReadyExternalMessage, ) -> StartupReadyExternalProjection<Transport, SourceCleanliness>
Projects one StartupReadyExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Ready, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Ready, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: ReadyInternalMessage,
) -> ReadyInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: ReadyInternalMessage, ) -> ReadyInternalProjection<Transport, SourceCleanliness>
Projects one ReadyInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Ready, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Ready, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: ReadyExternalMessage,
) -> ReadyExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: ReadyExternalMessage, ) -> ReadyExternalProjection<Transport, SourceCleanliness>
Projects one ReadyExternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Terminated, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Terminated, SourceCleanliness>
Sourcepub fn project_internal_message(
self,
message: TerminatedInternalMessage,
) -> TerminatedInternalProjection<Transport, SourceCleanliness>
pub fn project_internal_message( self, message: TerminatedInternalMessage, ) -> TerminatedInternalProjection<Transport, SourceCleanliness>
Projects one TerminatedInternalMessage into its message-selected next connection.
Source§impl<Transport, SourceCleanliness> TypedSession<Transport, Terminated, SourceCleanliness>
impl<Transport, SourceCleanliness> TypedSession<Transport, Terminated, SourceCleanliness>
Sourcepub fn project_external_message(
self,
message: TerminatedExternalMessage,
) -> TerminatedExternalProjection<Transport, SourceCleanliness>
pub fn project_external_message( self, message: TerminatedExternalMessage, ) -> TerminatedExternalProjection<Transport, SourceCleanliness>
Projects one TerminatedExternalMessage into its message-selected next connection.
Source§impl<Transport, Cleanliness> TypedSession<Transport, Startup, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, Startup, Cleanliness>
Sourcepub const fn with_transport(transport: Transport) -> Self
pub const fn with_transport(transport: Transport) -> Self
Attaches transport to a session in the initial phase.
Source§impl<Transport, Phase, Cleanliness> TypedSession<Transport, Phase, Cleanliness>
impl<Transport, Phase, Cleanliness> TypedSession<Transport, Phase, Cleanliness>
Sourcepub fn map_transport<Next>(
self,
map: impl FnOnce(Transport) -> Next,
) -> TypedSession<Next, Phase, Cleanliness>
pub fn map_transport<Next>( self, map: impl FnOnce(Transport) -> Next, ) -> TypedSession<Next, Phase, Cleanliness>
Replaces the transport representation without changing protocol indices.
Sourcepub fn into_transport(self) -> Transport
pub fn into_transport(self) -> Transport
Deliberately leaves the generated typestate API and returns its transport.
Source§impl<Transport, Cleanliness> TypedSession<Transport, Startup, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, Startup, Cleanliness>
Sourcepub fn begin(self) -> TypedSession<Transport, Auth, Cleanliness>
pub fn begin(self) -> TypedSession<Transport, Auth, Cleanliness>
Applies begin and enters Auth.
Sourcepub fn reject(self) -> TypedSession<Transport, Terminated, Cleanliness>
pub fn reject(self) -> TypedSession<Transport, Terminated, Cleanliness>
Applies reject and enters Terminated.
Source§impl<Transport, Cleanliness> TypedSession<Transport, Auth, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, Auth, Cleanliness>
Sourcepub fn negotiate<Output, Error>(
self,
payload: NegotiateProtocolVersion,
handle: impl FnOnce(&mut Transport, NegotiateProtocolVersion) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Auth, Cleanliness>, Output), (Self, Error)>
pub fn negotiate<Output, Error>( self, payload: NegotiateProtocolVersion, handle: impl FnOnce(&mut Transport, NegotiateProtocolVersion) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Auth, Cleanliness>, Output), (Self, Error)>
Handles the payload for negotiate; success enters Auth and failure returns the unchanged session.
Sourcepub fn cleartext(self) -> TypedSession<Transport, PasswordResponse, Cleanliness>
pub fn cleartext(self) -> TypedSession<Transport, PasswordResponse, Cleanliness>
Applies cleartext and enters PasswordResponse.
Sourcepub fn md5<Output, Error>(
self,
payload: [u8; 4],
handle: impl FnOnce(&mut Transport, [u8; 4]) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, PasswordResponse, Cleanliness>, Output), (Self, Error)>
pub fn md5<Output, Error>( self, payload: [u8; 4], handle: impl FnOnce(&mut Transport, [u8; 4]) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, PasswordResponse, Cleanliness>, Output), (Self, Error)>
Handles the payload for md5; success enters PasswordResponse and failure returns the unchanged session.
Sourcepub fn sasl<Output, Error>(
self,
payload: Vec<Bytes>,
handle: impl FnOnce(&mut Transport, Vec<Bytes>) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SaslInitial, Cleanliness>, Output), (Self, Error)>
pub fn sasl<Output, Error>( self, payload: Vec<Bytes>, handle: impl FnOnce(&mut Transport, Vec<Bytes>) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SaslInitial, Cleanliness>, Output), (Self, Error)>
Handles the payload for sasl; success enters SaslInitial and failure returns the unchanged session.
Sourcepub fn gss(self) -> TypedSession<Transport, TokenResponse, Cleanliness>
pub fn gss(self) -> TypedSession<Transport, TokenResponse, Cleanliness>
Applies gss and enters TokenResponse.
Sourcepub fn sspi(self) -> TypedSession<Transport, TokenResponse, Cleanliness>
pub fn sspi(self) -> TypedSession<Transport, TokenResponse, Cleanliness>
Applies sspi and enters TokenResponse.
Sourcepub fn kerberos_v5(self) -> TypedSession<Transport, TokenResponse, Cleanliness>
pub fn kerberos_v5(self) -> TypedSession<Transport, TokenResponse, Cleanliness>
Applies kerberos_v5 and enters TokenResponse.
Sourcepub fn ok(self) -> TypedSession<Transport, StartupReady, Cleanliness>
pub fn ok(self) -> TypedSession<Transport, StartupReady, Cleanliness>
Applies ok and enters StartupReady.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Terminated, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Terminated, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters Terminated and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, PasswordResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, PasswordResponse, Cleanliness>
Sourcepub fn response<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Auth, Cleanliness>, Output), (Self, Error)>
pub fn response<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Auth, Cleanliness>, Output), (Self, Error)>
Handles the payload for response; success enters Auth and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SaslInitial, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SaslInitial, Cleanliness>
Sourcepub fn initial<Output, Error>(
self,
payload: SaslInitialResponse,
handle: impl FnOnce(&mut Transport, SaslInitialResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Sasl, Cleanliness>, Output), (Self, Error)>
pub fn initial<Output, Error>( self, payload: SaslInitialResponse, handle: impl FnOnce(&mut Transport, SaslInitialResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Sasl, Cleanliness>, Output), (Self, Error)>
Handles the payload for initial; success enters Sasl and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, Sasl, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, Sasl, Cleanliness>
Sourcepub fn continue_response<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SaslResponse, Cleanliness>, Output), (Self, Error)>
pub fn continue_response<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SaslResponse, Cleanliness>, Output), (Self, Error)>
Handles the payload for continue_response; success enters SaslResponse and failure returns the unchanged session.
Sourcepub fn final_response<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Auth, Cleanliness>, Output), (Self, Error)>
pub fn final_response<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Auth, Cleanliness>, Output), (Self, Error)>
Handles the payload for final_response; success enters Auth and failure returns the unchanged session.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Terminated, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Terminated, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters Terminated and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SaslResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SaslResponse, Cleanliness>
Sourcepub fn response<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Sasl, Cleanliness>, Output), (Self, Error)>
pub fn response<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Sasl, Cleanliness>, Output), (Self, Error)>
Handles the payload for response; success enters Sasl and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, TokenResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, TokenResponse, Cleanliness>
Sourcepub fn response<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, TokenPolicy, Cleanliness>, Output), (Self, Error)>
pub fn response<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, TokenPolicy, Cleanliness>, Output), (Self, Error)>
Handles the payload for response; success enters TokenPolicy and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, TokenPolicy, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, TokenPolicy, Cleanliness>
Sourcepub fn continue_token<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, TokenResponse, Cleanliness>, Output), (Self, Error)>
pub fn continue_token<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, TokenResponse, Cleanliness>, Output), (Self, Error)>
Handles the payload for continue_token; success enters TokenResponse and failure returns the unchanged session.
Sourcepub fn verified(self) -> TypedSession<Transport, Auth, Cleanliness>
pub fn verified(self) -> TypedSession<Transport, Auth, Cleanliness>
Applies verified and enters Auth.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Terminated, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Terminated, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters Terminated and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, StartupReady, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, StartupReady, Cleanliness>
Sourcepub fn parameter_status<Output, Error>(
self,
payload: (Bytes, Bytes),
handle: impl FnOnce(&mut Transport, (Bytes, Bytes)) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, StartupReady, Cleanliness>, Output), (Self, Error)>
pub fn parameter_status<Output, Error>( self, payload: (Bytes, Bytes), handle: impl FnOnce(&mut Transport, (Bytes, Bytes)) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, StartupReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for parameter_status; success enters StartupReady and failure returns the unchanged session.
Sourcepub fn backend_key_data<Output, Error>(
self,
payload: (u32, Bytes),
handle: impl FnOnce(&mut Transport, (u32, Bytes)) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, StartupReady, Cleanliness>, Output), (Self, Error)>
pub fn backend_key_data<Output, Error>( self, payload: (u32, Bytes), handle: impl FnOnce(&mut Transport, (u32, Bytes)) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, StartupReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for backend_key_data; success enters StartupReady and failure returns the unchanged session.
Sourcepub fn ready<Output, Error>(
self,
payload: TransactionStatus,
handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
pub fn ready<Output, Error>( self, payload: TransactionStatus, handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
Handles the payload for ready; success enters Ready and failure returns the unchanged session.