pub struct DualTypedSession<Transport, Phase, Cleanliness = ()> { /* private fields */ }Expand description
Transport-carrying typestate for the peer role.
Implementations§
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, Ready, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, Ready, Cleanliness>
Sourcepub const fn with_transport(transport: Transport) -> Self
pub const fn with_transport(transport: Transport) -> Self
Attaches transport to a dual session in the initial phase.
Source§impl<Transport, Phase, Cleanliness> DualTypedSession<Transport, Phase, Cleanliness>
impl<Transport, Phase, Cleanliness> DualTypedSession<Transport, Phase, Cleanliness>
Sourcepub fn map_transport<Next>(
self,
map: impl FnOnce(Transport) -> Next,
) -> DualTypedSession<Next, Phase, Cleanliness>
pub fn map_transport<Next>( self, map: impl FnOnce(Transport) -> Next, ) -> DualTypedSession<Next, Phase, Cleanliness>
Replaces the dual transport representation without changing protocol indices.
Sourcepub fn into_transport(self) -> Transport
pub fn into_transport(self) -> Transport
Deliberately leaves the generated dual API and returns its transport.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, Ready, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, Ready, Cleanliness>
Sourcepub fn query<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Simple, Dirty>, Output), (Self, Error)>
pub fn query<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Simple, Dirty>, Output), (Self, Error)>
Handles the dual payload for query; success enters Simple and failure returns the unchanged session.
Sourcepub fn parse<Output, Error>(
self,
payload: Parse,
handle: impl FnOnce(&mut Transport, Parse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ParseResponse, Dirty>, Output), (Self, Error)>
pub fn parse<Output, Error>( self, payload: Parse, handle: impl FnOnce(&mut Transport, Parse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ParseResponse, Dirty>, Output), (Self, Error)>
Handles the dual payload for parse; success enters ParseResponse and failure returns the unchanged session.
Sourcepub fn bind<Output, Error>(
self,
payload: Bind,
handle: impl FnOnce(&mut Transport, Bind) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, BindResponse, Dirty>, Output), (Self, Error)>
pub fn bind<Output, Error>( self, payload: Bind, handle: impl FnOnce(&mut Transport, Bind) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, BindResponse, Dirty>, Output), (Self, Error)>
Handles the dual payload for bind; success enters BindResponse and failure returns the unchanged session.
Sourcepub fn describe<Output, Error>(
self,
payload: Describe,
handle: impl FnOnce(&mut Transport, Describe) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, DescribeResponse, Cleanliness>, Output), (Self, Error)>
pub fn describe<Output, Error>( self, payload: Describe, handle: impl FnOnce(&mut Transport, Describe) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, DescribeResponse, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for describe; success enters DescribeResponse and failure returns the unchanged session.
Sourcepub fn execute<Output, Error>(
self,
payload: Execute,
handle: impl FnOnce(&mut Transport, Execute) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExecuteResponse, Dirty>, Output), (Self, Error)>
pub fn execute<Output, Error>( self, payload: Execute, handle: impl FnOnce(&mut Transport, Execute) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExecuteResponse, Dirty>, Output), (Self, Error)>
Handles the dual payload for execute; success enters ExecuteResponse and failure returns the unchanged session.
Sourcepub fn close<Output, Error>(
self,
payload: Close,
handle: impl FnOnce(&mut Transport, Close) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, CloseResponse, Cleanliness>, Output), (Self, Error)>
pub fn close<Output, Error>( self, payload: Close, handle: impl FnOnce(&mut Transport, Close) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, CloseResponse, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for close; success enters CloseResponse and failure returns the unchanged session.
Sourcepub fn function_call<Output, Error>(
self,
payload: FunctionCall,
handle: impl FnOnce(&mut Transport, FunctionCall) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, FunctionResponse, Dirty>, Output), (Self, Error)>
pub fn function_call<Output, Error>( self, payload: FunctionCall, handle: impl FnOnce(&mut Transport, FunctionCall) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, FunctionResponse, Dirty>, Output), (Self, Error)>
Handles the dual payload for function_call; success enters FunctionResponse and failure returns the unchanged session.
Sourcepub fn terminate(self) -> DualTypedSession<Transport, Terminated, Cleanliness>
pub fn terminate(self) -> DualTypedSession<Transport, Terminated, Cleanliness>
Applies the dual terminate transition and enters Terminated.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, Simple, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, Simple, Cleanliness>
Sourcepub fn continue_response<Output, Error>(
self,
payload: BackendMessage,
handle: impl FnOnce(&mut Transport, BackendMessage) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Simple, Cleanliness>, Output), (Self, Error)>
pub fn continue_response<Output, Error>( self, payload: BackendMessage, handle: impl FnOnce(&mut Transport, BackendMessage) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Simple, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for continue_response; success enters Simple and failure returns the unchanged session.
Sourcepub fn copy_in<Output, Error>(
self,
payload: CopyResponse,
handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyIn, Cleanliness>, Output), (Self, Error)>
pub fn copy_in<Output, Error>( self, payload: CopyResponse, handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyIn, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for copy_in; success enters SimpleCopyIn and failure returns the unchanged session.
Sourcepub fn copy_out<Output, Error>(
self,
payload: CopyResponse,
handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyOut, Cleanliness>, Output), (Self, Error)>
pub fn copy_out<Output, Error>( self, payload: CopyResponse, handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyOut, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for copy_out; success enters SimpleCopyOut and failure returns the unchanged session.
Sourcepub fn copy_both<Output, Error>(
self,
payload: CopyResponse,
handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyBoth, Cleanliness>, Output), (Self, Error)>
pub fn copy_both<Output, Error>( self, payload: CopyResponse, handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for copy_both; success enters SimpleCopyBoth and failure returns the unchanged session.
Sourcepub fn ready<Output, Error>(
self,
payload: TransactionStatus,
handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
pub fn ready<Output, Error>( self, payload: TransactionStatus, handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for ready; success enters Ready and failure returns the unchanged session.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters SimpleError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleError, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleError, Cleanliness>
Sourcepub fn ready<Output, Error>(
self,
payload: TransactionStatus,
handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
pub fn ready<Output, Error>( self, payload: TransactionStatus, handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for ready; success enters Ready and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, Building, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, Building, Cleanliness>
Sourcepub fn parse<Output, Error>(
self,
payload: Parse,
handle: impl FnOnce(&mut Transport, Parse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ParseResponse, Dirty>, Output), (Self, Error)>
pub fn parse<Output, Error>( self, payload: Parse, handle: impl FnOnce(&mut Transport, Parse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ParseResponse, Dirty>, Output), (Self, Error)>
Handles the dual payload for parse; success enters ParseResponse and failure returns the unchanged session.
Sourcepub fn bind<Output, Error>(
self,
payload: Bind,
handle: impl FnOnce(&mut Transport, Bind) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, BindResponse, Dirty>, Output), (Self, Error)>
pub fn bind<Output, Error>( self, payload: Bind, handle: impl FnOnce(&mut Transport, Bind) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, BindResponse, Dirty>, Output), (Self, Error)>
Handles the dual payload for bind; success enters BindResponse and failure returns the unchanged session.
Sourcepub fn describe<Output, Error>(
self,
payload: Describe,
handle: impl FnOnce(&mut Transport, Describe) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, DescribeResponse, Cleanliness>, Output), (Self, Error)>
pub fn describe<Output, Error>( self, payload: Describe, handle: impl FnOnce(&mut Transport, Describe) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, DescribeResponse, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for describe; success enters DescribeResponse and failure returns the unchanged session.
Sourcepub fn execute<Output, Error>(
self,
payload: Execute,
handle: impl FnOnce(&mut Transport, Execute) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExecuteResponse, Dirty>, Output), (Self, Error)>
pub fn execute<Output, Error>( self, payload: Execute, handle: impl FnOnce(&mut Transport, Execute) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExecuteResponse, Dirty>, Output), (Self, Error)>
Handles the dual payload for execute; success enters ExecuteResponse and failure returns the unchanged session.
Sourcepub fn close<Output, Error>(
self,
payload: Close,
handle: impl FnOnce(&mut Transport, Close) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, CloseResponse, Cleanliness>, Output), (Self, Error)>
pub fn close<Output, Error>( self, payload: Close, handle: impl FnOnce(&mut Transport, Close) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, CloseResponse, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for close; success enters CloseResponse and failure returns the unchanged session.
Sourcepub fn flush(self) -> DualTypedSession<Transport, Building, Cleanliness>
pub fn flush(self) -> DualTypedSession<Transport, Building, Cleanliness>
Applies the dual flush transition and enters Building.
Sourcepub fn sync(self) -> DualTypedSession<Transport, SyncResponse, Cleanliness>
pub fn sync(self) -> DualTypedSession<Transport, SyncResponse, Cleanliness>
Applies the dual sync transition and enters SyncResponse.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ParseResponse, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ParseResponse, Cleanliness>
Sourcepub fn complete(self) -> DualTypedSession<Transport, Building, Cleanliness>
pub fn complete(self) -> DualTypedSession<Transport, Building, Cleanliness>
Applies the dual complete transition and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, BindResponse, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, BindResponse, Cleanliness>
Sourcepub fn complete(self) -> DualTypedSession<Transport, Building, Cleanliness>
pub fn complete(self) -> DualTypedSession<Transport, Building, Cleanliness>
Applies the dual complete transition and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, DescribeResponse, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, DescribeResponse, Cleanliness>
Sourcepub fn row_description<Output, Error>(
self,
payload: RowDescription,
handle: impl FnOnce(&mut Transport, RowDescription) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
pub fn row_description<Output, Error>( self, payload: RowDescription, handle: impl FnOnce(&mut Transport, RowDescription) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for row_description; success enters Building and failure returns the unchanged session.
Sourcepub fn no_data(self) -> DualTypedSession<Transport, Building, Cleanliness>
pub fn no_data(self) -> DualTypedSession<Transport, Building, Cleanliness>
Applies the dual no_data transition and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExecuteResponse, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExecuteResponse, Cleanliness>
Sourcepub fn continue_response<Output, Error>(
self,
payload: BackendMessage,
handle: impl FnOnce(&mut Transport, BackendMessage) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExecuteResponse, Cleanliness>, Output), (Self, Error)>
pub fn continue_response<Output, Error>( self, payload: BackendMessage, handle: impl FnOnce(&mut Transport, BackendMessage) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExecuteResponse, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for continue_response; success enters ExecuteResponse and failure returns the unchanged session.
Sourcepub fn copy_in<Output, Error>(
self,
payload: CopyResponse,
handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyIn, Cleanliness>, Output), (Self, Error)>
pub fn copy_in<Output, Error>( self, payload: CopyResponse, handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyIn, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for copy_in; success enters ExtendedCopyIn and failure returns the unchanged session.
Sourcepub fn copy_out<Output, Error>(
self,
payload: CopyResponse,
handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyOut, Cleanliness>, Output), (Self, Error)>
pub fn copy_out<Output, Error>( self, payload: CopyResponse, handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyOut, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for copy_out; success enters ExtendedCopyOut and failure returns the unchanged session.
Sourcepub fn copy_both<Output, Error>(
self,
payload: CopyResponse,
handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyBoth, Cleanliness>, Output), (Self, Error)>
pub fn copy_both<Output, Error>( self, payload: CopyResponse, handle: impl FnOnce(&mut Transport, CopyResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for copy_both; success enters ExtendedCopyBoth and failure returns the unchanged session.
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
pub fn command_complete<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for command_complete; success enters Building and failure returns the unchanged session.
Sourcepub fn portal_suspended(
self,
) -> DualTypedSession<Transport, Building, Cleanliness>
pub fn portal_suspended( self, ) -> DualTypedSession<Transport, Building, Cleanliness>
Applies the dual portal_suspended transition and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, CloseResponse, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, CloseResponse, Cleanliness>
Sourcepub fn complete(self) -> DualTypedSession<Transport, Building, Cleanliness>
pub fn complete(self) -> DualTypedSession<Transport, Building, Cleanliness>
Applies the dual complete transition and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedError, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedError, Cleanliness>
Sourcepub fn discard(self) -> DualTypedSession<Transport, ExtendedError, Cleanliness>
pub fn discard(self) -> DualTypedSession<Transport, ExtendedError, Cleanliness>
Applies the dual discard transition and enters ExtendedError.
Sourcepub fn sync(self) -> DualTypedSession<Transport, SyncResponse, Cleanliness>
pub fn sync(self) -> DualTypedSession<Transport, SyncResponse, Cleanliness>
Applies the dual sync transition and enters SyncResponse.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SyncResponse, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SyncResponse, Cleanliness>
Sourcepub fn ready<Output, Error>(
self,
payload: TransactionStatus,
handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
pub fn ready<Output, Error>( self, payload: TransactionStatus, handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for ready; success enters Ready and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, FunctionResponse, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, FunctionResponse, Cleanliness>
Sourcepub fn result<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, FunctionReady, Cleanliness>, Output), (Self, Error)>
pub fn result<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, FunctionReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for result; success enters FunctionReady and failure returns the unchanged session.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, FunctionReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, FunctionReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters FunctionReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, FunctionReady, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, FunctionReady, Cleanliness>
Sourcepub fn ready<Output, Error>(
self,
payload: TransactionStatus,
handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
pub fn ready<Output, Error>( self, payload: TransactionStatus, handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for ready; success enters Ready and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyIn, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyIn, Cleanliness>
Sourcepub fn data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyIn, Cleanliness>, Output), (Self, Error)>
pub fn data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyIn, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for data; success enters SimpleCopyIn and failure returns the unchanged session.
Sourcepub fn done(self) -> DualTypedSession<Transport, SimpleCopyInDone, Cleanliness>
pub fn done(self) -> DualTypedSession<Transport, SimpleCopyInDone, Cleanliness>
Applies the dual done transition and enters SimpleCopyInDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyInFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyInFailed, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for fail; success enters SimpleCopyInFailed and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyInDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyInDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn command_complete<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for command_complete; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyInFailed, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyInFailed, Cleanliness>
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyOut, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyOut, Cleanliness>
Sourcepub fn data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyOut, Cleanliness>, Output), (Self, Error)>
pub fn data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyOut, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for data; success enters SimpleCopyOut and failure returns the unchanged session.
Sourcepub fn done(self) -> DualTypedSession<Transport, SimpleCopyOutDone, Cleanliness>
pub fn done(self) -> DualTypedSession<Transport, SimpleCopyOutDone, Cleanliness>
Applies the dual done transition and enters SimpleCopyOutDone.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyOutDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyOutDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn command_complete<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for command_complete; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyReady, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyReady, Cleanliness>
Sourcepub fn ready<Output, Error>(
self,
payload: TransactionStatus,
handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
pub fn ready<Output, Error>( self, payload: TransactionStatus, handle: impl FnOnce(&mut Transport, TransactionStatus) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Ready, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for ready; success enters Ready and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyIn, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyIn, Cleanliness>
Sourcepub fn data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyIn, Cleanliness>, Output), (Self, Error)>
pub fn data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyIn, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for data; success enters ExtendedCopyIn and failure returns the unchanged session.
Sourcepub fn done(
self,
) -> DualTypedSession<Transport, ExtendedCopyInDone, Cleanliness>
pub fn done( self, ) -> DualTypedSession<Transport, ExtendedCopyInDone, Cleanliness>
Applies the dual done transition and enters ExtendedCopyInDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyInFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyInFailed, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for fail; success enters ExtendedCopyInFailed and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyInDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyInDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
pub fn command_complete<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for command_complete; success enters Building and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyInFailed, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyInFailed, Cleanliness>
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyOut, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyOut, Cleanliness>
Sourcepub fn data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyOut, Cleanliness>, Output), (Self, Error)>
pub fn data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyOut, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for data; success enters ExtendedCopyOut and failure returns the unchanged session.
Sourcepub fn done(
self,
) -> DualTypedSession<Transport, ExtendedCopyOutDone, Cleanliness>
pub fn done( self, ) -> DualTypedSession<Transport, ExtendedCopyOutDone, Cleanliness>
Applies the dual done transition and enters ExtendedCopyOutDone.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyOutDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyOutDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
pub fn command_complete<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for command_complete; success enters Building and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBoth, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBoth, Cleanliness>
Sourcepub fn send_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyBoth, Cleanliness>, Output), (Self, Error)>
pub fn send_data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for send_data; success enters SimpleCopyBoth and failure returns the unchanged session.
Sourcepub fn receive_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyBoth, Cleanliness>, Output), (Self, Error)>
pub fn receive_data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for receive_data; success enters SimpleCopyBoth and failure returns the unchanged session.
Sourcepub fn send_done(
self,
) -> DualTypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>
pub fn send_done( self, ) -> DualTypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>
Applies the dual send_done transition and enters SimpleCopyBothServerDone.
Sourcepub fn receive_done(
self,
) -> DualTypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>
pub fn receive_done( self, ) -> DualTypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>
Applies the dual receive_done transition and enters SimpleCopyBothClientDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyBothFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyBothFailed, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for fail; success enters SimpleCopyBothFailed and failure returns the unchanged session.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>
Sourcepub fn send_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>, Output), (Self, Error)>
pub fn send_data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for send_data; success enters SimpleCopyBothClientDone and failure returns the unchanged session.
Sourcepub fn send_done(
self,
) -> DualTypedSession<Transport, SimpleCopyBothDone, Cleanliness>
pub fn send_done( self, ) -> DualTypedSession<Transport, SimpleCopyBothDone, Cleanliness>
Applies the dual send_done transition and enters SimpleCopyBothDone.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>
Sourcepub fn receive_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>, Output), (Self, Error)>
pub fn receive_data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for receive_data; success enters SimpleCopyBothServerDone and failure returns the unchanged session.
Sourcepub fn receive_done(
self,
) -> DualTypedSession<Transport, SimpleCopyBothDone, Cleanliness>
pub fn receive_done( self, ) -> DualTypedSession<Transport, SimpleCopyBothDone, Cleanliness>
Applies the dual receive_done transition and enters SimpleCopyBothDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyBothFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyBothFailed, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for fail; success enters SimpleCopyBothFailed and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBothDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBothDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn command_complete<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for command_complete; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBothFailed, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, SimpleCopyBothFailed, Cleanliness>
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBoth, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBoth, Cleanliness>
Sourcepub fn send_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyBoth, Cleanliness>, Output), (Self, Error)>
pub fn send_data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for send_data; success enters ExtendedCopyBoth and failure returns the unchanged session.
Sourcepub fn receive_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyBoth, Cleanliness>, Output), (Self, Error)>
pub fn receive_data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for receive_data; success enters ExtendedCopyBoth and failure returns the unchanged session.
Sourcepub fn send_done(
self,
) -> DualTypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>
pub fn send_done( self, ) -> DualTypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>
Applies the dual send_done transition and enters ExtendedCopyBothServerDone.
Sourcepub fn receive_done(
self,
) -> DualTypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>
pub fn receive_done( self, ) -> DualTypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>
Applies the dual receive_done transition and enters ExtendedCopyBothClientDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for fail; success enters ExtendedCopyBothFailed and failure returns the unchanged session.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>
Sourcepub fn send_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>, Output), (Self, Error)>
pub fn send_data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for send_data; success enters ExtendedCopyBothClientDone and failure returns the unchanged session.
Sourcepub fn send_done(
self,
) -> DualTypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
pub fn send_done( self, ) -> DualTypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
Applies the dual send_done transition and enters ExtendedCopyBothDone.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>
Sourcepub fn receive_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>, Output), (Self, Error)>
pub fn receive_data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for receive_data; success enters ExtendedCopyBothServerDone and failure returns the unchanged session.
Sourcepub fn receive_done(
self,
) -> DualTypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
pub fn receive_done( self, ) -> DualTypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
Applies the dual receive_done transition and enters ExtendedCopyBothDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for fail; success enters ExtendedCopyBothFailed and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
pub fn command_complete<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for command_complete; success enters Building and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>
impl<Transport, Cleanliness> DualTypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(DualTypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the dual payload for error; success enters ExtendedError and failure returns the unchanged session.