Skip to main content

TypedSession

Struct TypedSession 

Source
pub struct TypedSession<Transport, Phase, Cleanliness = ()> { /* private fields */ }
Expand description

Transport-carrying typestate for this protocol role.

Implementations§

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, Ready, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ReadyInternalMessage, ) -> ReadyInternalProjection<Transport, SourceCleanliness>

Projects one ReadyInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, Ready, SourceCleanliness>

Source

pub fn project_external_message( self, message: ReadyExternalMessage, ) -> ReadyExternalProjection<Transport, SourceCleanliness>

Projects one ReadyExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, Simple, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleInternalMessage, ) -> SimpleInternalProjection<Transport, SourceCleanliness>

Projects one SimpleInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, Simple, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleExternalMessage, ) -> SimpleExternalProjection<Transport, SourceCleanliness>

Projects one SimpleExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleError, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleErrorInternalMessage, ) -> SimpleErrorInternalProjection<Transport, SourceCleanliness>

Projects one SimpleErrorInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleError, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleErrorExternalMessage, ) -> SimpleErrorExternalProjection<Transport, SourceCleanliness>

Projects one SimpleErrorExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, Building, SourceCleanliness>

Source

pub fn project_internal_message( self, message: BuildingInternalMessage, ) -> BuildingInternalProjection<Transport, SourceCleanliness>

Projects one BuildingInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, Building, SourceCleanliness>

Source

pub fn project_external_message( self, message: BuildingExternalMessage, ) -> BuildingExternalProjection<Transport, SourceCleanliness>

Projects one BuildingExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ParseResponse, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ParseResponseInternalMessage, ) -> ParseResponseInternalProjection<Transport, SourceCleanliness>

Projects one ParseResponseInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ParseResponse, SourceCleanliness>

Source

pub fn project_external_message( self, message: ParseResponseExternalMessage, ) -> ParseResponseExternalProjection<Transport, SourceCleanliness>

Projects one ParseResponseExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, BindResponse, SourceCleanliness>

Source

pub fn project_internal_message( self, message: BindResponseInternalMessage, ) -> BindResponseInternalProjection<Transport, SourceCleanliness>

Projects one BindResponseInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, BindResponse, SourceCleanliness>

Source

pub fn project_external_message( self, message: BindResponseExternalMessage, ) -> BindResponseExternalProjection<Transport, SourceCleanliness>

Projects one BindResponseExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, DescribeResponse, SourceCleanliness>

Source

pub fn project_internal_message( self, message: DescribeResponseInternalMessage, ) -> DescribeResponseInternalProjection<Transport, SourceCleanliness>

Projects one DescribeResponseInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, DescribeResponse, SourceCleanliness>

Source

pub fn project_external_message( self, message: DescribeResponseExternalMessage, ) -> DescribeResponseExternalProjection<Transport, SourceCleanliness>

Projects one DescribeResponseExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExecuteResponse, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExecuteResponseInternalMessage, ) -> ExecuteResponseInternalProjection<Transport, SourceCleanliness>

Projects one ExecuteResponseInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExecuteResponse, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExecuteResponseExternalMessage, ) -> ExecuteResponseExternalProjection<Transport, SourceCleanliness>

Projects one ExecuteResponseExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, CloseResponse, SourceCleanliness>

Source

pub fn project_internal_message( self, message: CloseResponseInternalMessage, ) -> CloseResponseInternalProjection<Transport, SourceCleanliness>

Projects one CloseResponseInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, CloseResponse, SourceCleanliness>

Source

pub fn project_external_message( self, message: CloseResponseExternalMessage, ) -> CloseResponseExternalProjection<Transport, SourceCleanliness>

Projects one CloseResponseExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedError, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedErrorInternalMessage, ) -> ExtendedErrorInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedErrorInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedError, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedErrorExternalMessage, ) -> ExtendedErrorExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedErrorExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SyncResponse, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SyncResponseInternalMessage, ) -> SyncResponseInternalProjection<Transport, SourceCleanliness>

Projects one SyncResponseInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SyncResponse, SourceCleanliness>

Source

pub fn project_external_message( self, message: SyncResponseExternalMessage, ) -> SyncResponseExternalProjection<Transport, SourceCleanliness>

Projects one SyncResponseExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, FunctionResponse, SourceCleanliness>

Source

pub fn project_internal_message( self, message: FunctionResponseInternalMessage, ) -> FunctionResponseInternalProjection<Transport, SourceCleanliness>

Projects one FunctionResponseInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, FunctionResponse, SourceCleanliness>

Source

pub fn project_external_message( self, message: FunctionResponseExternalMessage, ) -> FunctionResponseExternalProjection<Transport, SourceCleanliness>

Projects one FunctionResponseExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, FunctionReady, SourceCleanliness>

Source

pub fn project_internal_message( self, message: FunctionReadyInternalMessage, ) -> FunctionReadyInternalProjection<Transport, SourceCleanliness>

Projects one FunctionReadyInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, FunctionReady, SourceCleanliness>

Source

pub fn project_external_message( self, message: FunctionReadyExternalMessage, ) -> FunctionReadyExternalProjection<Transport, SourceCleanliness>

Projects one FunctionReadyExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyIn, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyInInternalMessage, ) -> SimpleCopyInInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyInInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyIn, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyInExternalMessage, ) -> SimpleCopyInExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyInExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyInDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyInDoneInternalMessage, ) -> SimpleCopyInDoneInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyInDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyInDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyInDoneExternalMessage, ) -> SimpleCopyInDoneExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyInDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyInFailed, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyInFailedInternalMessage, ) -> SimpleCopyInFailedInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyInFailedInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyInFailed, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyInFailedExternalMessage, ) -> SimpleCopyInFailedExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyInFailedExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyOut, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyOutInternalMessage, ) -> SimpleCopyOutInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyOutInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyOut, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyOutExternalMessage, ) -> SimpleCopyOutExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyOutExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyOutDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyOutDoneInternalMessage, ) -> SimpleCopyOutDoneInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyOutDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyOutDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyOutDoneExternalMessage, ) -> SimpleCopyOutDoneExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyOutDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyReady, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyReadyInternalMessage, ) -> SimpleCopyReadyInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyReadyInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyReady, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyReadyExternalMessage, ) -> SimpleCopyReadyExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyReadyExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyIn, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyInInternalMessage, ) -> ExtendedCopyInInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyInInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyIn, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyInExternalMessage, ) -> ExtendedCopyInExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyInExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyInDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyInDoneInternalMessage, ) -> ExtendedCopyInDoneInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyInDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyInDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyInDoneExternalMessage, ) -> ExtendedCopyInDoneExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyInDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyInFailed, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyInFailedInternalMessage, ) -> ExtendedCopyInFailedInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyInFailedInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyInFailed, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyInFailedExternalMessage, ) -> ExtendedCopyInFailedExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyInFailedExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyOut, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyOutInternalMessage, ) -> ExtendedCopyOutInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyOutInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyOut, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyOutExternalMessage, ) -> ExtendedCopyOutExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyOutExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyOutDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyOutDoneInternalMessage, ) -> ExtendedCopyOutDoneInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyOutDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyOutDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyOutDoneExternalMessage, ) -> ExtendedCopyOutDoneExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyOutDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBoth, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyBothInternalMessage, ) -> SimpleCopyBothInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBoth, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyBothExternalMessage, ) -> SimpleCopyBothExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBothClientDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyBothClientDoneInternalMessage, ) -> SimpleCopyBothClientDoneInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothClientDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBothClientDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyBothClientDoneExternalMessage, ) -> SimpleCopyBothClientDoneExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothClientDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBothServerDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyBothServerDoneInternalMessage, ) -> SimpleCopyBothServerDoneInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothServerDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBothServerDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyBothServerDoneExternalMessage, ) -> SimpleCopyBothServerDoneExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothServerDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBothDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyBothDoneInternalMessage, ) -> SimpleCopyBothDoneInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBothDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyBothDoneExternalMessage, ) -> SimpleCopyBothDoneExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBothFailed, SourceCleanliness>

Source

pub fn project_internal_message( self, message: SimpleCopyBothFailedInternalMessage, ) -> SimpleCopyBothFailedInternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothFailedInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, SimpleCopyBothFailed, SourceCleanliness>

Source

pub fn project_external_message( self, message: SimpleCopyBothFailedExternalMessage, ) -> SimpleCopyBothFailedExternalProjection<Transport, SourceCleanliness>

Projects one SimpleCopyBothFailedExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBoth, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyBothInternalMessage, ) -> ExtendedCopyBothInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBoth, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyBothExternalMessage, ) -> ExtendedCopyBothExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBothClientDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyBothClientDoneInternalMessage, ) -> ExtendedCopyBothClientDoneInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothClientDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBothClientDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyBothClientDoneExternalMessage, ) -> ExtendedCopyBothClientDoneExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothClientDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBothServerDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyBothServerDoneInternalMessage, ) -> ExtendedCopyBothServerDoneInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothServerDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBothServerDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyBothServerDoneExternalMessage, ) -> ExtendedCopyBothServerDoneExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothServerDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBothDone, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyBothDoneInternalMessage, ) -> ExtendedCopyBothDoneInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothDoneInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBothDone, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyBothDoneExternalMessage, ) -> ExtendedCopyBothDoneExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothDoneExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBothFailed, SourceCleanliness>

Source

pub fn project_internal_message( self, message: ExtendedCopyBothFailedInternalMessage, ) -> ExtendedCopyBothFailedInternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothFailedInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, ExtendedCopyBothFailed, SourceCleanliness>

Source

pub fn project_external_message( self, message: ExtendedCopyBothFailedExternalMessage, ) -> ExtendedCopyBothFailedExternalProjection<Transport, SourceCleanliness>

Projects one ExtendedCopyBothFailedExternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, Terminated, SourceCleanliness>

Source

pub fn project_internal_message( self, message: TerminatedInternalMessage, ) -> TerminatedInternalProjection<Transport, SourceCleanliness>

Projects one TerminatedInternalMessage into its message-selected next connection.

Source§

impl<Transport, SourceCleanliness> TypedSession<Transport, Terminated, SourceCleanliness>

Source

pub fn project_external_message( self, message: TerminatedExternalMessage, ) -> TerminatedExternalProjection<Transport, SourceCleanliness>

Projects one TerminatedExternalMessage into its message-selected next connection.

Source§

impl<Transport, Cleanliness> TypedSession<Transport, Ready, Cleanliness>

Source

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>

Source

pub fn map_transport<Next>( self, map: impl FnOnce(Transport) -> Next, ) -> TypedSession<Next, Phase, Cleanliness>

Replaces the transport representation without changing protocol indices.

Source

pub fn into_transport(self) -> Transport

Deliberately leaves the generated typestate API and returns its transport.

Source§

impl<Transport, Cleanliness> TypedSession<Transport, Ready, Cleanliness>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn terminate(self) -> TypedSession<Transport, Terminated, Cleanliness>

Applies terminate and enters Terminated.

Source§

impl<Transport, Cleanliness> TypedSession<Transport, Simple, Cleanliness>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

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>

Source

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>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn flush(self) -> TypedSession<Transport, Building, Cleanliness>

Applies flush and enters Building.

Source

pub fn sync(self) -> TypedSession<Transport, SyncResponse, Cleanliness>

Applies sync and enters SyncResponse.

Source§

impl<Transport, Cleanliness> TypedSession<Transport, ParseResponse, Cleanliness>

Source

pub fn complete(self) -> TypedSession<Transport, Building, Cleanliness>

Applies complete and enters Building.

Source

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>

Source

pub fn complete(self) -> TypedSession<Transport, Building, Cleanliness>

Applies complete and enters Building.

Source

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>

Source

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.

Source

pub fn no_data(self) -> TypedSession<Transport, Building, Cleanliness>

Applies no_data and enters Building.

Source

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>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

pub fn portal_suspended(self) -> TypedSession<Transport, Building, Cleanliness>

Applies portal_suspended and enters Building.

Source

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>

Source

pub fn complete(self) -> TypedSession<Transport, Building, Cleanliness>

Applies complete and enters Building.

Source

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>

Source

pub fn discard(self) -> TypedSession<Transport, ExtendedError, Cleanliness>

Applies discard and enters ExtendedError.

Source

pub fn sync(self) -> TypedSession<Transport, SyncResponse, Cleanliness>

Applies sync and enters SyncResponse.

Source§

impl<Transport, Cleanliness> TypedSession<Transport, SyncResponse, Cleanliness>

Source

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>

Source

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.

Source

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>

Source

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>

Source

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.

Source

pub fn done(self) -> TypedSession<Transport, SimpleCopyInDone, Cleanliness>

Applies done and enters SimpleCopyInDone.

Source

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>

Source

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>

Source

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>

Source

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.

Source

pub fn done(self) -> TypedSession<Transport, SimpleCopyOutDone, Cleanliness>

Applies done and enters SimpleCopyOutDone.

Source

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>

Source

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>

Source

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>

Source

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.

Source

pub fn done(self) -> TypedSession<Transport, ExtendedCopyInDone, Cleanliness>

Applies done and enters ExtendedCopyInDone.

Source

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>

Source

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>

Source

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>

Source

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.

Source

pub fn done(self) -> TypedSession<Transport, ExtendedCopyOutDone, Cleanliness>

Applies done and enters ExtendedCopyOutDone.

Source

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>

Source

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>

Source

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.

Source

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.

Source

pub fn send_done( self, ) -> TypedSession<Transport, SimpleCopyBothServerDone, Cleanliness>

Applies send_done and enters SimpleCopyBothServerDone.

Source

pub fn receive_done( self, ) -> TypedSession<Transport, SimpleCopyBothClientDone, Cleanliness>

Applies receive_done and enters SimpleCopyBothClientDone.

Source

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

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>

Source

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.

Source

pub fn send_done( self, ) -> TypedSession<Transport, SimpleCopyBothDone, Cleanliness>

Applies send_done and enters SimpleCopyBothDone.

Source

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>

Source

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.

Source

pub fn receive_done( self, ) -> TypedSession<Transport, SimpleCopyBothDone, Cleanliness>

Applies receive_done and enters SimpleCopyBothDone.

Source

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>

Source

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>

Source

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>

Source

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.

Source

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.

Source

pub fn send_done( self, ) -> TypedSession<Transport, ExtendedCopyBothServerDone, Cleanliness>

Applies send_done and enters ExtendedCopyBothServerDone.

Source

pub fn receive_done( self, ) -> TypedSession<Transport, ExtendedCopyBothClientDone, Cleanliness>

Applies receive_done and enters ExtendedCopyBothClientDone.

Source

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

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>

Source

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.

Source

pub fn send_done( self, ) -> TypedSession<Transport, ExtendedCopyBothDone, Cleanliness>

Applies send_done and enters ExtendedCopyBothDone.

Source

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>

Source

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.

Source

pub fn receive_done( self, ) -> TypedSession<Transport, ExtendedCopyBothDone, Cleanliness>

Applies receive_done and enters ExtendedCopyBothDone.

Source

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>

Source

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>

Source

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.

Trait Implementations§

Source§

impl<Transport: Debug, Phase: Debug, Cleanliness: Debug> Debug for TypedSession<Transport, Phase, Cleanliness>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Transport, Phase, Cleanliness> Freeze for TypedSession<Transport, Phase, Cleanliness>
where Transport: Freeze,

§

impl<Transport, Phase, Cleanliness> RefUnwindSafe for TypedSession<Transport, Phase, Cleanliness>
where Transport: RefUnwindSafe, Phase: RefUnwindSafe, Cleanliness: RefUnwindSafe,

§

impl<Transport, Phase, Cleanliness> Send for TypedSession<Transport, Phase, Cleanliness>
where Transport: Send, Phase: Send, Cleanliness: Send,

§

impl<Transport, Phase, Cleanliness> Sync for TypedSession<Transport, Phase, Cleanliness>
where Transport: Sync, Phase: Sync, Cleanliness: Sync,

§

impl<Transport, Phase, Cleanliness> Unpin for TypedSession<Transport, Phase, Cleanliness>
where Transport: Unpin, Phase: Unpin, Cleanliness: Unpin,

§

impl<Transport, Phase, Cleanliness> UnsafeUnpin for TypedSession<Transport, Phase, Cleanliness>
where Transport: UnsafeUnpin,

§

impl<Transport, Phase, Cleanliness> UnwindSafe for TypedSession<Transport, Phase, Cleanliness>
where Transport: UnwindSafe, Phase: UnwindSafe, Cleanliness: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Handler> MessageMiddlewareExt for Handler

Source§

fn then<Next>(self, next: Next) -> Then<Self, Next>

Runs this value followed by next whenever both implement middleware for the intercepted message and state types.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.