Skip to main content

TypedPhase

Trait TypedPhase 

Source
pub trait TypedPhase<Role, Wire> {
    type ProtocolPhase;
    type Message: AsRef<Wire> + TryFrom<Wire, Error = Wire> + Into<Wire>;
}
Expand description

Associates a connection typestate with its generated legal message type.

Implementations are provided only for matching sender roles and decoded wire directions. This is the bridge which lets crate::Conn infer middleware’s Role, ProtocolPhase, and Message indices from its own phase parameter.

Required Associated Types§

Source

type ProtocolPhase

Generated grammar phase corresponding to the connection typestate.

Source

type Message: AsRef<Wire> + TryFrom<Wire, Error = Wire> + Into<Wire>

Opaque set of decoded messages legal for this role and phase.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl TypedPhase<ClientRole, FrontendMessage> for Ready

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerAuth

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerAuthResponse

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerBuilding

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerCopyBoth<CopyExtended, BothOpen>

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerCopyBoth<CopyExtended, BothServerDone>

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerCopyBoth<CopySimple, BothOpen>

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerCopyBoth<CopySimple, BothServerDone>

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerCopyIn<CopyExtended>

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerCopyIn<CopySimple>

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerExtendedError

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerPassword

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerSasl

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerSaslInitial

Source§

impl TypedPhase<ClientRole, FrontendMessage> for ServerStartupReady

Source§

impl TypedPhase<ClientRole, PreStartupMessage> for PreStartup

Source§

impl TypedPhase<ServerRole, BackendMessage> for Auth

Source§

impl TypedPhase<ServerRole, BackendMessage> for AwaitingAuthOk

Source§

impl TypedPhase<ServerRole, BackendMessage> for AwaitingReady

Source§

impl TypedPhase<ServerRole, BackendMessage> for AwaitingStartupReady

Source§

impl TypedPhase<ServerRole, BackendMessage> for BoundBuilding

Source§

impl TypedPhase<ServerRole, BackendMessage> for Building

Source§

impl TypedPhase<ServerRole, BackendMessage> for CopyBoth

Source§

impl TypedPhase<ServerRole, BackendMessage> for CopyBothClientDone

Source§

impl TypedPhase<ServerRole, BackendMessage> for CopyBothServerDone

Source§

impl TypedPhase<ServerRole, BackendMessage> for CopyIn

Source§

impl TypedPhase<ServerRole, BackendMessage> for CopyOut

Source§

impl TypedPhase<ServerRole, BackendMessage> for Draining

Source§

impl TypedPhase<ServerRole, BackendMessage> for FunctionCalling

Source§

impl TypedPhase<ServerRole, BackendMessage> for Ready

Source§

impl TypedPhase<ServerRole, BackendMessage> for ResetComplete

Source§

impl TypedPhase<ServerRole, BackendMessage> for Resetting

Source§

impl TypedPhase<ServerRole, BackendMessage> for Sasl

Source§

impl TypedPhase<ServerRole, BackendMessage> for SimpleQuery

Source§

impl TypedPhase<ServerRole, BackendMessage> for TokenChallenge

Source§

impl TypedPhase<ServerRole, EncryptionReply> for AwaitingGssReply

Source§

impl TypedPhase<ServerRole, EncryptionReply> for AwaitingSslReply