pub struct TypedSession<Transport, Phase, Cleanliness = ()> { /* private fields */ }Expand description
Transport-carrying typestate for this protocol role.
Implementations§
Source§impl<Transport, Cleanliness> TypedSession<Transport, Ready, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, Ready, 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, Ready, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, Ready, Cleanliness>
Sourcepub fn query<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, Simple, Dirty>, Output), (Self, Error)>
pub fn query<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, Simple, Dirty>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, ParseResponse, Dirty>, Output), (Self, Error)>
pub fn parse<Output, Error>( self, payload: Parse, handle: impl FnOnce(&mut Transport, Parse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ParseResponse, Dirty>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, BindResponse, Dirty>, Output), (Self, Error)>
pub fn bind<Output, Error>( self, payload: Bind, handle: impl FnOnce(&mut Transport, Bind) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, BindResponse, Dirty>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, DescribeResponse, Cleanliness>, Output), (Self, Error)>
pub fn describe<Output, Error>( self, payload: Describe, handle: impl FnOnce(&mut Transport, Describe) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, DescribeResponse, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, ExecuteResponse, Dirty>, Output), (Self, Error)>
pub fn execute<Output, Error>( self, payload: Execute, handle: impl FnOnce(&mut Transport, Execute) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExecuteResponse, Dirty>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, CloseResponse, Cleanliness>, Output), (Self, Error)>
pub fn close<Output, Error>( self, payload: Close, handle: impl FnOnce(&mut Transport, Close) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, CloseResponse, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, FunctionResponse, Dirty>, Output), (Self, Error)>
Handles the payload for function_call; success enters FunctionResponse and failure returns the unchanged session.
Sourcepub fn terminate(self) -> TypedSession<Transport, Terminated, Cleanliness>
pub fn terminate(self) -> TypedSession<Transport, Terminated, Cleanliness>
Applies terminate and enters Terminated.
Source§impl<Transport, Cleanliness> TypedSession<Transport, Simple, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, Simple, Cleanliness>
Sourcepub fn continue_response<Output, Error>(
self,
payload: BackendMessage,
handle: impl FnOnce(&mut Transport, BackendMessage) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, Simple, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, SimpleCopyIn, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, SimpleCopyOut, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, SimpleCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the 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<(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.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters SimpleError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleError, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleError, Cleanliness>
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.
Source§impl<Transport, Cleanliness> TypedSession<Transport, Building, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, Building, Cleanliness>
Sourcepub fn parse<Output, Error>(
self,
payload: Parse,
handle: impl FnOnce(&mut Transport, Parse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ParseResponse, Dirty>, Output), (Self, Error)>
pub fn parse<Output, Error>( self, payload: Parse, handle: impl FnOnce(&mut Transport, Parse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ParseResponse, Dirty>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, BindResponse, Dirty>, Output), (Self, Error)>
pub fn bind<Output, Error>( self, payload: Bind, handle: impl FnOnce(&mut Transport, Bind) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, BindResponse, Dirty>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, DescribeResponse, Cleanliness>, Output), (Self, Error)>
pub fn describe<Output, Error>( self, payload: Describe, handle: impl FnOnce(&mut Transport, Describe) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, DescribeResponse, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, ExecuteResponse, Dirty>, Output), (Self, Error)>
pub fn execute<Output, Error>( self, payload: Execute, handle: impl FnOnce(&mut Transport, Execute) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExecuteResponse, Dirty>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, CloseResponse, Cleanliness>, Output), (Self, Error)>
pub fn close<Output, Error>( self, payload: Close, handle: impl FnOnce(&mut Transport, Close) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, CloseResponse, Cleanliness>, Output), (Self, Error)>
Handles the payload for close; success enters CloseResponse and failure returns the unchanged session.
Sourcepub fn flush(self) -> TypedSession<Transport, Building, Cleanliness>
pub fn flush(self) -> TypedSession<Transport, Building, Cleanliness>
Applies flush and enters Building.
Sourcepub fn sync(self) -> TypedSession<Transport, SyncResponse, Cleanliness>
pub fn sync(self) -> TypedSession<Transport, SyncResponse, Cleanliness>
Applies sync and enters SyncResponse.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ParseResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ParseResponse, Cleanliness>
Sourcepub fn complete(self) -> TypedSession<Transport, Building, Cleanliness>
pub fn complete(self) -> TypedSession<Transport, Building, Cleanliness>
Applies complete and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, BindResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, BindResponse, Cleanliness>
Sourcepub fn complete(self) -> TypedSession<Transport, Building, Cleanliness>
pub fn complete(self) -> TypedSession<Transport, Building, Cleanliness>
Applies complete and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, DescribeResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, DescribeResponse, Cleanliness>
Sourcepub fn row_description<Output, Error>(
self,
payload: RowDescription,
handle: impl FnOnce(&mut Transport, RowDescription) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the payload for row_description; success enters Building and failure returns the unchanged session.
Sourcepub fn no_data(self) -> TypedSession<Transport, Building, Cleanliness>
pub fn no_data(self) -> TypedSession<Transport, Building, Cleanliness>
Applies no_data and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExecuteResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExecuteResponse, Cleanliness>
Sourcepub fn continue_response<Output, Error>(
self,
payload: BackendMessage,
handle: impl FnOnce(&mut Transport, BackendMessage) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, ExecuteResponse, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, ExtendedCopyIn, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, ExtendedCopyOut, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, ExtendedCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the payload for command_complete; success enters Building and failure returns the unchanged session.
Sourcepub fn portal_suspended(self) -> TypedSession<Transport, Building, Cleanliness>
pub fn portal_suspended(self) -> TypedSession<Transport, Building, Cleanliness>
Applies portal_suspended and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, CloseResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, CloseResponse, Cleanliness>
Sourcepub fn complete(self) -> TypedSession<Transport, Building, Cleanliness>
pub fn complete(self) -> TypedSession<Transport, Building, Cleanliness>
Applies complete and enters Building.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedError, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedError, Cleanliness>
Sourcepub fn discard(self) -> TypedSession<Transport, ExtendedError, Cleanliness>
pub fn discard(self) -> TypedSession<Transport, ExtendedError, Cleanliness>
Applies discard and enters ExtendedError.
Sourcepub fn sync(self) -> TypedSession<Transport, SyncResponse, Cleanliness>
pub fn sync(self) -> TypedSession<Transport, SyncResponse, Cleanliness>
Applies sync and enters SyncResponse.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SyncResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SyncResponse, Cleanliness>
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.
Source§impl<Transport, Cleanliness> TypedSession<Transport, FunctionResponse, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, FunctionResponse, Cleanliness>
Sourcepub fn result<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, FunctionReady, Cleanliness>, Output), (Self, Error)>
pub fn result<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, FunctionReady, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, FunctionReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, FunctionReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters FunctionReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, FunctionReady, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, FunctionReady, Cleanliness>
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.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyIn, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyIn, Cleanliness>
Sourcepub fn data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleCopyIn, Cleanliness>, Output), (Self, Error)>
pub fn data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyIn, Cleanliness>, Output), (Self, Error)>
Handles the payload for data; success enters SimpleCopyIn and failure returns the unchanged session.
Sourcepub fn done(self) -> TypedSession<Transport, SimpleCopyInDone, Cleanliness>
pub fn done(self) -> TypedSession<Transport, SimpleCopyInDone, Cleanliness>
Applies done and enters SimpleCopyInDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleCopyInFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyInFailed, Cleanliness>, Output), (Self, Error)>
Handles the payload for fail; success enters SimpleCopyInFailed and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyInDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyInDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for command_complete; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyInFailed, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyInFailed, Cleanliness>
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyOut, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyOut, Cleanliness>
Sourcepub fn data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleCopyOut, Cleanliness>, Output), (Self, Error)>
pub fn data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyOut, Cleanliness>, Output), (Self, Error)>
Handles the payload for data; success enters SimpleCopyOut and failure returns the unchanged session.
Sourcepub fn done(self) -> TypedSession<Transport, SimpleCopyOutDone, Cleanliness>
pub fn done(self) -> TypedSession<Transport, SimpleCopyOutDone, Cleanliness>
Applies done and enters SimpleCopyOutDone.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyOutDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyOutDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for command_complete; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyReady, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyReady, Cleanliness>
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.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyIn, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyIn, Cleanliness>
Sourcepub fn data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedCopyIn, Cleanliness>, Output), (Self, Error)>
pub fn data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedCopyIn, Cleanliness>, Output), (Self, Error)>
Handles the payload for data; success enters ExtendedCopyIn and failure returns the unchanged session.
Sourcepub fn done(self) -> TypedSession<Transport, ExtendedCopyInDone, Cleanliness>
pub fn done(self) -> TypedSession<Transport, ExtendedCopyInDone, Cleanliness>
Applies done and enters ExtendedCopyInDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedCopyInFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedCopyInFailed, Cleanliness>, Output), (Self, Error)>
Handles the payload for fail; success enters ExtendedCopyInFailed and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyInDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyInDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the payload for command_complete; success enters Building and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyInFailed, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyInFailed, Cleanliness>
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyOut, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyOut, Cleanliness>
Sourcepub fn data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedCopyOut, Cleanliness>, Output), (Self, Error)>
pub fn data<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedCopyOut, Cleanliness>, Output), (Self, Error)>
Handles the payload for data; success enters ExtendedCopyOut and failure returns the unchanged session.
Sourcepub fn done(self) -> TypedSession<Transport, ExtendedCopyOutDone, Cleanliness>
pub fn done(self) -> TypedSession<Transport, ExtendedCopyOutDone, Cleanliness>
Applies done and enters ExtendedCopyOutDone.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyOutDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyOutDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the payload for command_complete; success enters Building and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBoth, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBoth, Cleanliness>
Sourcepub fn send_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, SimpleCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, SimpleCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the payload for receive_data; success enters SimpleCopyBoth and failure returns the unchanged session.
Sourcepub fn send_done(
self,
) -> TypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>
pub fn send_done( self, ) -> TypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>
Applies send_done and enters SimpleCopyBothServerDone.
Sourcepub fn receive_done(
self,
) -> TypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>
pub fn receive_done( self, ) -> TypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>
Applies receive_done and enters SimpleCopyBothClientDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleCopyBothFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyBothFailed, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>
Sourcepub fn send_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>, Output), (Self, Error)>
Handles the payload for send_data; success enters SimpleCopyBothClientDone and failure returns the unchanged session.
Sourcepub fn send_done(
self,
) -> TypedSession<Transport, SimpleCopyBothDone, Cleanliness>
pub fn send_done( self, ) -> TypedSession<Transport, SimpleCopyBothDone, Cleanliness>
Applies send_done and enters SimpleCopyBothDone.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>
Sourcepub fn receive_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>, Output), (Self, Error)>
Handles the payload for receive_data; success enters SimpleCopyBothServerDone and failure returns the unchanged session.
Sourcepub fn receive_done(
self,
) -> TypedSession<Transport, SimpleCopyBothDone, Cleanliness>
pub fn receive_done( self, ) -> TypedSession<Transport, SimpleCopyBothDone, Cleanliness>
Applies receive_done and enters SimpleCopyBothDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleCopyBothFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyBothFailed, Cleanliness>, Output), (Self, Error)>
Handles the payload for fail; success enters SimpleCopyBothFailed and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBothDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBothDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for command_complete; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBothFailed, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, SimpleCopyBothFailed, Cleanliness>
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, SimpleCopyReady, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters SimpleCopyReady and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBoth, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBoth, Cleanliness>
Sourcepub fn send_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, ExtendedCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<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<(TypedSession<Transport, ExtendedCopyBoth, Cleanliness>, Output), (Self, Error)>
Handles the payload for receive_data; success enters ExtendedCopyBoth and failure returns the unchanged session.
Sourcepub fn send_done(
self,
) -> TypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>
pub fn send_done( self, ) -> TypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>
Applies send_done and enters ExtendedCopyBothServerDone.
Sourcepub fn receive_done(
self,
) -> TypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>
pub fn receive_done( self, ) -> TypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>
Applies receive_done and enters ExtendedCopyBothClientDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>, Output), (Self, Error)>
Handles the 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<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>
Sourcepub fn send_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>, Output), (Self, Error)>
Handles the payload for send_data; success enters ExtendedCopyBothClientDone and failure returns the unchanged session.
Sourcepub fn send_done(
self,
) -> TypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
pub fn send_done( self, ) -> TypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
Applies send_done and enters ExtendedCopyBothDone.
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>
Sourcepub fn receive_data<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>, Output), (Self, Error)>
Handles the payload for receive_data; success enters ExtendedCopyBothServerDone and failure returns the unchanged session.
Sourcepub fn receive_done(
self,
) -> TypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
pub fn receive_done( self, ) -> TypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
Applies receive_done and enters ExtendedCopyBothDone.
Sourcepub fn fail<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>, Output), (Self, Error)>
pub fn fail<Output, Error>( self, payload: Bytes, handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>, Output), (Self, Error)>
Handles the payload for fail; success enters ExtendedCopyBothFailed and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBothDone, Cleanliness>
Sourcepub fn command_complete<Output, Error>(
self,
payload: Bytes,
handle: impl FnOnce(&mut Transport, Bytes) -> Result<Output, Error>,
) -> Result<(TypedSession<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<(TypedSession<Transport, Building, Cleanliness>, Output), (Self, Error)>
Handles the payload for command_complete; success enters Building and failure returns the unchanged session.
Source§impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>
impl<Transport, Cleanliness> TypedSession<Transport, ExtendedCopyBothFailed, Cleanliness>
Sourcepub fn error<Output, Error>(
self,
payload: DiagnosticResponse,
handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>,
) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
pub fn error<Output, Error>( self, payload: DiagnosticResponse, handle: impl FnOnce(&mut Transport, DiagnosticResponse) -> Result<Output, Error>, ) -> Result<(TypedSession<Transport, ExtendedError, Cleanliness>, Output), (Self, Error)>
Handles the payload for error; success enters ExtendedError and failure returns the unchanged session.