pub enum ServerProtocolOffer<S, C> {
Supported {
conn: Conn<S, ServerStartupValidated, C>,
message: StartupMessage,
negotiate_to: Option<ProtocolVersion>,
},
Rejected {
conn: Conn<S, ServerStartupRejected, C>,
message: StartupMessage,
},
}Expand description
Result of validating a client’s requested protocol version.
Variants§
Supported
The major version is supported, with optional minor-version negotiation.
Fields
§
conn: Conn<S, ServerStartupValidated, C>Connection authorised to begin authentication.
§
message: StartupMessageInspected startup message.
§
negotiate_to: Option<ProtocolVersion>Highest supported version to advertise when the requested minor is newer.
Rejected
The major protocol version is unsupported.
Fields
§
conn: Conn<S, ServerStartupRejected, C>Connection authorised only to send an error and terminate.
§
message: StartupMessageRejected startup message.
Trait Implementations§
Auto Trait Implementations§
impl<S, C> Freeze for ServerProtocolOffer<S, C>where
S: Freeze,
impl<S, C> RefUnwindSafe for ServerProtocolOffer<S, C>where
S: RefUnwindSafe,
C: RefUnwindSafe,
impl<S, C> Send for ServerProtocolOffer<S, C>
impl<S, C> Sync for ServerProtocolOffer<S, C>
impl<S, C> Unpin for ServerProtocolOffer<S, C>
impl<S, C> UnsafeUnpin for ServerProtocolOffer<S, C>where
S: UnsafeUnpin,
impl<S, C> UnwindSafe for ServerProtocolOffer<S, C>where
S: UnwindSafe,
C: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more