pub struct AuthenticationExchange { /* private fields */ }Expand description
Validates one PostgreSQL authentication exchange while leaving credential
verification and secret storage to the embedding server.
Implementations§
Source§impl AuthenticationExchange
impl AuthenticationExchange
pub const fn new() -> Self
Sourcepub fn send(
&mut self,
authentication: &Authentication,
) -> Result<(), PgWireError>
pub fn send( &mut self, authentication: &Authentication, ) -> Result<(), PgWireError>
Record an authentication message before it is sent to the frontend.
Sourcepub fn receive(
&mut self,
message: &PasswordMessage,
) -> Result<AuthenticationResponse, PgWireError>
pub fn receive( &mut self, message: &PasswordMessage, ) -> Result<AuthenticationResponse, PgWireError>
Decode the context-dependent frontend message tagged p and advance
the exchange to its next backend decision point.
pub fn fail(&mut self) -> Result<(), PgWireError>
pub const fn is_complete(&self) -> bool
pub const fn is_failed(&self) -> bool
pub const fn awaiting_response(&self) -> Option<AuthenticationResponseKind>
Trait Implementations§
Source§impl Clone for AuthenticationExchange
impl Clone for AuthenticationExchange
Source§fn clone(&self) -> AuthenticationExchange
fn clone(&self) -> AuthenticationExchange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthenticationExchange
impl Debug for AuthenticationExchange
Source§impl Default for AuthenticationExchange
impl Default for AuthenticationExchange
impl Eq for AuthenticationExchange
Source§impl PartialEq for AuthenticationExchange
impl PartialEq for AuthenticationExchange
impl StructuralPartialEq for AuthenticationExchange
Auto Trait Implementations§
impl Freeze for AuthenticationExchange
impl RefUnwindSafe for AuthenticationExchange
impl Send for AuthenticationExchange
impl Sync for AuthenticationExchange
impl Unpin for AuthenticationExchange
impl UnsafeUnpin for AuthenticationExchange
impl UnwindSafe for AuthenticationExchange
Blanket Implementations§
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